mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Use vec.data() instead of &vec[0]
In general `vec.data()` is always safe, whereas `&vec[0]` may fail when `vec` is empty.
This commit is contained in:
@@ -174,7 +174,7 @@ static void writeBank(std::deque<struct Section const *> *bankSections, uint16_t
|
||||
}
|
||||
|
||||
// Output the section itself
|
||||
fwrite(§ion->data[0], 1, section->size, outputFile);
|
||||
fwrite(section->data.data(), 1, section->size, outputFile);
|
||||
if (overlayFile) {
|
||||
// Skip bytes even with pipes
|
||||
for (uint16_t i = 0; i < section->size; i++)
|
||||
|
||||
Reference in New Issue
Block a user