Fix assigning null character out of string bounds

This commit is contained in:
indev committed 2023-11-27 17:06:38 +03:00
1 parent 0907c219af
commit 7599d9ddd4
1 file changed
+1 -1
+1 -1
View File
@@ -8363,7 +8363,7 @@ static void M_DrawMusicTest(void)
}
strncpy(buf, soundtestdefs[t]->source + nameoffset, MAXLENGTH);
buf[MAXLENGTH+1] = 0;
buf[MAXLENGTH] = 0;
V_DrawString(x, y, (t == st_sel ? V_YELLOWMAP : 0)|V_ALLOWLOWERCASE|V_MONOSPACE, buf);
if (curplaying == soundtestdefs[t])