summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Howard2008-07-31 20:21:58 +0000
committerSimon Howard2008-07-31 20:21:58 +0000
commit7dcb9c7e6041c12db593323751a36311ba3a54c7 (patch)
tree17c5dc2687505a64dc634c58e2d0e283b1d101f2
parent8c7078eca9a086f50002d5b84a0b8e80a9d36070 (diff)
downloadchocolate-doom-7dcb9c7e6041c12db593323751a36311ba3a54c7.tar.gz
chocolate-doom-7dcb9c7e6041c12db593323751a36311ba3a54c7.tar.bz2
chocolate-doom-7dcb9c7e6041c12db593323751a36311ba3a54c7.zip
Fix crash on Chex Quest intermission screen (thanks entryway)
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1166
-rw-r--r--src/wi_stuff.c12
1 files changed, 6 insertions, 6 deletions
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)
{