Fix findMedia to make sure it gets both media header segments
This commit is contained in:
parent
fd5beb2adf
commit
9063a0179d
@ -23,8 +23,8 @@ uint8_t *findMedia() {
|
|||||||
const static auto headerP2Len = 16;
|
const static auto headerP2Len = 16;
|
||||||
const static auto headerLen = headerP1Len + headerP2Len + 1;
|
const static auto headerLen = headerP1Len + headerP2Len + 1;
|
||||||
|
|
||||||
for (uint8_t *current = &MEM_ROM; current < ((uint8_t*) 0x0a000000); current += headerLen) {
|
for (auto current = &MEM_ROM; current < ((uint8_t*) 0x0a000000); current += headerLen) {
|
||||||
if (ox_memcmp(current, headerP1, headerP1Len) == 0 ||
|
if (ox_memcmp(current, headerP1, headerP1Len) == 0 &&
|
||||||
ox_memcmp(current + headerP1Len, headerP2, headerP2Len) == 0) {
|
ox_memcmp(current + headerP1Len, headerP2, headerP2Len) == 0) {
|
||||||
return current + headerLen;
|
return current + headerLen;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user