From 27a95c7684de3cb568e27193eec7fdffd2a7f23b Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sat, 20 Aug 2011 18:23:27 +0100 Subject: [PATCH] Make 'Molten x' a little safer --- src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index 2441338db..9dd4ace4d 100644 --- a/src/main.c +++ b/src/main.c @@ -2575,7 +2575,7 @@ int main(int argc, char *argv[]) { sprintf(nametext, "%s (%s)", ptypes[cr&0xFF].name, gmenu[parts[cr>>8].ctype].name); } - else if ((cr&0xFF)==PT_LAVA && parts[cr>>8].ctype) + else if ((cr&0xFF)==PT_LAVA && parts[cr>>8].ctype > 0 && parts[cr>>8].ctype < PT_NUM ) { char lowername[6]; strcpy(lowername, ptypes[parts[cr>>8].ctype].name);