Fix infinite loop when trying to detach soap with extra ctype bits set

This commit is contained in:
jacksonmj 2012-05-20 23:19:45 +01:00
parent 089ea8b7a0
commit eb0b2f9ca3

View File

@ -31,13 +31,13 @@ int update_SOAP(UPDATE_FUNC_ARGS)
{ {
if (parts[i].life<=0) if (parts[i].life<=0)
{ {
if ((parts[i].ctype&6) != 6 && parts[i].ctype>1) if ((parts[i].ctype&6) != 6 && (parts[i].ctype&6))
{ {
int target; int target;
target = i; target = i;
while((parts[target].ctype&6) != 6 && parts[target].ctype>1) while((parts[target].ctype&6) != 6 && (parts[target].ctype&6))
{ {
if ((parts[target].ctype&2) == 2) if ((parts[target].ctype&2) == 2)
{ {