When updating redundant HUD messages check the for-loop not the start with a negative number - causes too long message display and negative array index
This commit is contained in:
parent
7864eb52a0
commit
85d4cbe3d2
|
@ -1,5 +1,9 @@
|
|||
D1X-Rebirth Changelog
|
||||
|
||||
20100803
|
||||
--------
|
||||
main/hud.c: When updating redundant HUD messages check the for-loop not the start with a negative number - causes too long message display and negative array index
|
||||
|
||||
20100801
|
||||
--------
|
||||
main/menu.c, main/songs.c, main/songs.h, main/gameseq.c, main/digi.h, arch/sdl/digi.c: Builtin music list now dynamically allocated and not limited to 30 songs; Instead of never loading new level when loading savestate ingame, only do this for Redbook and Custom Music playing order 'continously'; if no endlevel song is specified in Custom Music continue with level music
|
||||
|
|
|
@ -124,7 +124,7 @@ int HUD_init_message_va(char * format, va_list args)
|
|||
{
|
||||
HUD_messages[i].time = F1_0*2; // keep redundant message in list
|
||||
if (i >= HUD_nmessages-HUD_MAX_NUM_DISP) // if redundant message on display, update them all
|
||||
for (i = HUD_nmessages-HUD_MAX_NUM_DISP, j = 1; i < HUD_nmessages; i++, j++)
|
||||
for (i = (HUD_nmessages-HUD_MAX_NUM_DISP<0?0:HUD_nmessages-HUD_MAX_NUM_DISP), j = 1; i < HUD_nmessages; i++, j++)
|
||||
HUD_messages[i].time = F1_0*(j*2);
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue