mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Use automatic allocation for section data
This commit is contained in:
@@ -466,7 +466,7 @@ static void applyFilePatches(struct Section *section, struct Section *dataSectio
|
||||
error(patch.src, patch.lineNo,
|
||||
"jr target out of reach (expected -129 < %" PRId16 " < 128)",
|
||||
jumpOffset);
|
||||
(*dataSection->data)[offset] = jumpOffset & 0xFF;
|
||||
dataSection->data[offset] = jumpOffset & 0xFF;
|
||||
} else {
|
||||
// Patch a certain number of bytes
|
||||
struct {
|
||||
@@ -486,7 +486,7 @@ static void applyFilePatches(struct Section *section, struct Section *dataSectio
|
||||
value, value < 0 ? " (maybe negative?)" : "",
|
||||
types[patch.type].size * 8U);
|
||||
for (uint8_t i = 0; i < types[patch.type].size; i++) {
|
||||
(*dataSection->data)[offset + i] = value & 0xFF;
|
||||
dataSection->data[offset + i] = value & 0xFF;
|
||||
value >>= 8;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user