Ver código fonte

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.
Daniel Buckmaster 12 anos atrás
pai
commit
46f140710a
1 arquivos alterados com 2 adições e 0 exclusões
  1. 2 0
      Engine/source/console/simManager.cpp

+ 2 - 0
Engine/source/console/simManager.cpp

@@ -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;