From 7dcb9c7e6041c12db593323751a36311ba3a54c7 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Thu, 31 Jul 2008 20:21:58 +0000 Subject: Fix crash on Chex Quest intermission screen (thanks entryway) Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1166 --- src/wi_stuff.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/wi_stuff.c b/src/wi_stuff.c index bea7054f..938d6915 100644 --- a/src/wi_stuff.c +++ b/src/wi_stuff.c @@ -347,10 +347,10 @@ static int NUMCMAPS; // // You Are Here graphic -static patch_t* yah[2]; +static patch_t* yah[3] = { NULL, NULL, NULL }; // splat -static patch_t* splat; +static patch_t* splat[2] = { NULL, NULL }; // %, : graphics static patch_t* percent; @@ -489,7 +489,7 @@ WI_drawOnLnode { i++; } - } while (!fits && i!=2); + } while (!fits && i!=2 && c[i] != NULL); if (fits && i<2) { @@ -800,11 +800,11 @@ void WI_drawShowNextLoc(void) // draw a splat on taken cities. for (i=0 ; i<=last ; i++) - WI_drawOnLnode(i, &splat); + WI_drawOnLnode(i, splat); // splat the secret level? if (wbs->didsecret) - WI_drawOnLnode(8, &splat); + WI_drawOnLnode(8, splat); // draw flashing ptr if (snl_pointeron) @@ -1590,7 +1590,7 @@ static void WI_loadUnloadData(load_callback_t callback) callback(DEH_String("WIURH1"), &yah[1]); // splat - callback(DEH_String("WISPLAT"), &splat); + callback(DEH_String("WISPLAT"), &splat[0]); if (wbs->epsd < 3) { -- cgit v1.2.3