Make 'Molten x' a little safer

This commit is contained in:
Simon Robertshaw 2011-08-20 18:23:27 +01:00
parent 3ce69525ab
commit 27a95c7684

View File

@ -2575,7 +2575,7 @@ int main(int argc, char *argv[])
{ {
sprintf(nametext, "%s (%s)", ptypes[cr&0xFF].name, gmenu[parts[cr>>8].ctype].name); 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]; char lowername[6];
strcpy(lowername, ptypes[parts[cr>>8].ctype].name); strcpy(lowername, ptypes[parts[cr>>8].ctype].name);