RGBDS_OBJECT_VERSION_STRING is a literal

This commit is contained in:
Rangi42
2025-01-03 22:27:02 -05:00
committed by Rangi
parent 4e2464a69d
commit d9773424e4
2 changed files with 2 additions and 2 deletions

View File

@@ -322,7 +322,7 @@ void out_WriteObject() {
// Also write symbols that weren't written above // Also write symbols that weren't written above
sym_ForEach(registerUnregisteredSymbol); sym_ForEach(registerUnregisteredSymbol);
fprintf(file, RGBDS_OBJECT_VERSION_STRING); fputs(RGBDS_OBJECT_VERSION_STRING, file);
putLong(RGBDS_OBJECT_REV, file); putLong(RGBDS_OBJECT_REV, file);
putLong(objectSymbols.size(), file); putLong(objectSymbols.size(), file);

View File

@@ -528,7 +528,7 @@ void obj_ReadFile(char const *fileName, unsigned int fileID) {
int matchedElems; int matchedElems;
if (fscanf(file, RGBDS_OBJECT_VERSION_STRING "%n", &matchedElems) == 1 if (fscanf(file, RGBDS_OBJECT_VERSION_STRING "%n", &matchedElems) == 1
&& matchedElems != strlen(RGBDS_OBJECT_VERSION_STRING)) && matchedElems != QUOTEDSTRLEN(RGBDS_OBJECT_VERSION_STRING))
errx("%s: Not a RGBDS object file", fileName); errx("%s: Not a RGBDS object file", fileName);
verbosePrint("Reading object file %s\n", fileName); verbosePrint("Reading object file %s\n", fileName);