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

This commit is contained in:
Simon Robertshaw 2012-06-12 18:46:24 +01:00
parent 48459fc40d
commit efa0e5d0d6

View File

@ -64,13 +64,13 @@ int Element_SOAP::update(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)
{ {