From cebca02251c9bb751494059190e44fe10ae7a171 Mon Sep 17 00:00:00 2001 From: Rangi42 Date: Fri, 3 Jan 2025 22:27:02 -0500 Subject: [PATCH] `RGBDS_OBJECT_VERSION_STRING` is a literal --- src/asm/output.cpp | 2 +- src/link/object.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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);