mirror of
https://github.com/gbdev/rgbds.git
synced 2026-10-03 18:55:41 +00:00
Fix RGBLINK incorrectly reading file stack nodes
This caused node IDs to mismatch, yielding possibly corrupted file stacks Worst part is, the docs mentioned the reading order had to be reversed...
This commit is contained in:
1 parent
dc96cc6d1e
commit
b6bf7ae620
1 file changed
+1
-1
+1
-1
@@ -497,7 +497,7 @@ void obj_ReadFile(char const *fileName, unsigned int fileID)
|
||||
if (!nodes[fileID].nodes)
|
||||
err(1, "Failed to get memory for %s's nodes", fileName);
|
||||
verbosePrint("Reading %u nodes...\n", nodes[fileID].nbNodes);
|
||||
for (uint32_t i = 0; i < nodes[fileID].nbNodes; i++)
|
||||
for (uint32_t i = nodes[fileID].nbNodes; i--; )
|
||||
readFileStackNode(file, nodes[fileID].nodes, i, fileName);
|
||||
|
||||
/* This file's symbols, kept to link sections to them */
|
||||
|
||||
Reference in new issue
Block a user