Fix crash with abnormal ICE ctype

This commit is contained in:
jacksonmj 2011-10-14 06:54:50 +08:00 committed by Simon Robertshaw
parent 8e877594c9
commit 633c3da401

View File

@ -1847,7 +1847,7 @@ void update_particles_i(pixel *vid, int start, int inc)
if (ptransitions[t].tht!=PT_NUM) if (ptransitions[t].tht!=PT_NUM)
t = ptransitions[t].tht; t = ptransitions[t].tht;
else if (t==PT_ICEI) { else if (t==PT_ICEI) {
if (parts[i].ctype&&parts[i].ctype!=PT_ICEI) { if (parts[i].ctype>0&&parts[i].ctype<PT_NUM&&parts[i].ctype!=PT_ICEI) {
if (ptransitions[parts[i].ctype].tlt==PT_ICEI&&pt<=ptransitions[parts[i].ctype].tlv) s = 0; if (ptransitions[parts[i].ctype].tlt==PT_ICEI&&pt<=ptransitions[parts[i].ctype].tlv) s = 0;
else { else {
t = parts[i].ctype; t = parts[i].ctype;