Fix assigning null character out of string bounds
This commit is contained in:
1 parent
0907c219af
commit
7599d9ddd4
1 file changed
+1
-1
+1
-1
@@ -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])
|
||||
|
||||
Reference in new issue
Block a user