Removed obsolete HUD cleaning code - patch by Kp

This commit is contained in:
zicodxx 2013-01-03 17:32:58 +01:00
parent 1ba045abe5
commit 97c86f2b5e
2 changed files with 1 additions and 8 deletions

View file

@ -17,6 +17,7 @@ editor/centers.c, main/gamecntl.c: Fixed argument specifier mismatches flagged b
arch/ogl/gr.c, main/game.c: Moved screenshot message formating to HUD_init_message - patch by Kp (and me for non-OGL code ;))
main/automap.c, main/credits.c, main/gamerend.c, main/gauges.c, main/hud.c, main/kmatrix.c, main/menu.c, main/newmenu.c, main/scores.c: Converted gr_printf to gr_string where needed - patch by Kp
editor/medrobot.c, main/endlevel.c, main/gamecntl.c, main/powerup.c, main/wall.c, main/weapon.c, ui/file.c: Added dummy "%s" to prevent formatting untrusted literals - patch by Kp
main/hud.c: Removed obsolete HUD cleaning code - patch by Kp
20121102
--------

View file

@ -143,14 +143,6 @@ int HUD_init_message_va(int class_flag, char * format, va_list args)
}
}
// HACK!!!
// clean message if necessary.
// using placeholders may mess up message string and crash game(s).
// block them also to prevent attacks from other clients.
for (i = 0; i <= strlen(message); i++)
if (message[i] == '%')
message [i] = ' ';
if (HUD_nmessages >= HUD_MAX_NUM_STOR)
{
HUD_nmessages = HUD_MAX_NUM_STOR; // unnecessary but just in case it might be bigger... which is impossible