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:
GoldenTails 2021-09-03 09:14:04 -05:00
parent f0bee67d6e
commit 1639676e8d

View file

@ -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