VID_SetMode: SDLSetMode should use vid.width/vid.height, not windowedModes[modeNum].

If modenum was < 0 or >= MAXWINMODES, that would make windowedModes[modeNum] be out of bounds and possibly crash the game.
This commit is contained in:
Monster Iestyn 2017-05-15 15:36:51 +01:00
parent 093800cb06
commit d1bbd1261e

View file

@ -1188,7 +1188,7 @@ INT32 VID_SetMode(INT32 modeNum)
}
Impl_SetWindowName("SRB2 "VERSIONSTRING);
SDLSetMode(windowedModes[modeNum][0], windowedModes[modeNum][1], USE_FULLSCREEN);
SDLSetMode(vid.width, vid.height, USE_FULLSCREEN);
if (render_soft == rendermode)
{