diff --git a/src/asm/output.cpp b/src/asm/output.cpp index 01b17a3a6..0a6d783aa 100644 --- a/src/asm/output.cpp +++ b/src/asm/output.cpp @@ -322,7 +322,7 @@ void out_WriteObject() { // Also write symbols that weren't written above sym_ForEach(registerUnregisteredSymbol); - fprintf(file, RGBDS_OBJECT_VERSION_STRING); + fputs(RGBDS_OBJECT_VERSION_STRING, file); putLong(RGBDS_OBJECT_REV, file); putLong(objectSymbols.size(), file); diff --git a/src/link/object.cpp b/src/link/object.cpp index 26308354b..219624cf7 100644 --- a/src/link/object.cpp +++ b/src/link/object.cpp @@ -528,7 +528,7 @@ void obj_ReadFile(char const *fileName, unsigned int fileID) { int matchedElems; 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); verbosePrint("Reading object file %s\n", fileName);