mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-22 03:02:06 +00:00
Avoid using fscanf to detect RGBDS object files
This function is made for text, e.g. accepts spaces, leading zeros, etc. before `%u`. This way checks that the correct amount of bytes are read instead.
This commit is contained in:
@@ -532,7 +532,7 @@ void out_WriteObject(void)
|
||||
/* Also write symbols that weren't written above */
|
||||
sym_ForEach(registerUnregisteredSymbol, NULL);
|
||||
|
||||
fprintf(f, RGBDS_OBJECT_VERSION_STRING, RGBDS_OBJECT_VERSION_NUMBER);
|
||||
fprintf(f, RGBDS_OBJECT_VERSION_STRING);
|
||||
putlong(RGBDS_OBJECT_REV, f);
|
||||
|
||||
putlong(nbSymbols, f);
|
||||
|
||||
Reference in New Issue
Block a user