mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-02 06:04:21 +00:00
ST_drawDebugInfo: fix displayplayers access out of bounds on startup
On startup, the cvar is not registered yet so the value went negative subtracting from zero.
This commit is contained in:
parent
e5d51d5a31
commit
f087d6d865
1 changed files with 3 additions and 1 deletions
|
|
@ -438,8 +438,10 @@ void ST_drawDebugInfo(void)
|
|||
{
|
||||
INT32 height = 192;
|
||||
|
||||
const UINT8 screen = cv_devmode_screen.value - 1;
|
||||
|
||||
// devmode_screen = 1..4
|
||||
stplyr = &players[displayplayers[min(r_splitscreen, cv_devmode_screen.value - 1)]];
|
||||
stplyr = &players[displayplayers[min(r_splitscreen, screen)]];
|
||||
|
||||
if (!stplyr->mo)
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue