Prevented looking up incorrect object handles.

Previously, dAtoi would be called on arbitrary strings delimited
only by the / character. Now, Sim::findObject actually checks that
object handles (strings starting with a digit) actually only contain
digits or slashes.
This commit is contained in:
Daniel Buckmaster 2012-11-20 08:18:14 +11:00
parent fa1a0124a9
commit 46f140710a

View file

@ -367,6 +367,8 @@ SimObject* findObject(const char* name)
return NULL;
return obj->findObject(temp);
}
else if (c < '0' || c > '9')
return NULL;
}
}
S32 len;