mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-02 22:41:38 +00:00
Actually free the drawnstr pointer after we're done using it.
It probably was like this originally because past Golden was confused about why free was throwing errors :P
This commit is contained in:
parent
f0bee67d6e
commit
1639676e8d
1 changed files with 3 additions and 0 deletions
|
@ -11619,6 +11619,7 @@ static void M_DrawMPMainMenu(void)
|
|||
const INT32 boxwidth = /*16*8 + 6*/ (BASEVIDWIDTH - 2*(x+5));
|
||||
const INT32 maxstrwidth = boxwidth - 5;
|
||||
char *drawnstr = malloc(sizeof(setupm_ip));
|
||||
char *drawnstr_orig = drawnstr;
|
||||
boolean drawthin, shorten = false;
|
||||
|
||||
// use generic drawer for cursor, items and title
|
||||
|
@ -11678,6 +11679,8 @@ static void M_DrawMPMainMenu(void)
|
|||
else
|
||||
V_DrawCharacter(x+8+V_StringWidth(drawnstr, V_ALLOWLOWERCASE),y+12,'_',false);
|
||||
}
|
||||
|
||||
free(drawnstr_orig);
|
||||
}
|
||||
|
||||
#undef DOTS
|
||||
|
|
Loading…
Reference in a new issue