print the unedited musicdef field for whitespace warning

otherwise this may just show whitespaces where they arent ones originally
This commit is contained in:
alufolie91 committed 2026-07-21 14:53:13 +02:00
1 parent 4603749fae
commit 049c483d10
1 file changed
+3 -1
+3 -1
View File
@@ -1324,6 +1324,8 @@ static boolean ReadMusicDefFields(UINT16 wadnum, int line, char *stoken, musicde
// Now skip funny whitespace.
value += strspn(value, "\t ");
// remove trailing whitespaces
textline = value;
// turn _ into spaces.
@@ -1331,7 +1333,7 @@ static boolean ReadMusicDefFields(UINT16 wadnum, int line, char *stoken, musicde
int err = 0;\
STRBUFCPY(def->field, textline);\
for (textline = def->field; *textline; textline++) {\
if (err == 0 && *textline == ' ') {err = 1; CONS_Alert(CONS_WARNING, "MUSICDEF: Erroneous whitespace detected in field '%s': '%s'.\n(file %s, line %d) Musicdef might not work correctly!\n", stoken, def->field, wadfiles[wadnum]->filename, line);}\
if (err == 0 && *textline == ' ') {err = 1; CONS_Alert(CONS_WARNING, "MUSICDEF: Erroneous whitespace detected in field '%s': '%s'.\n(file %s, line %d) Musicdef might not work correctly!\n", stoken, value, wadfiles[wadnum]->filename, line);}\
if (*textline == '_') *textline = ' ';\
}