Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8388 in orxonox.OLD


Ignore:
Timestamp:
Jun 14, 2006, 3:05:41 PM (18 years ago)
Author:
bensch
Message:

script: security precaution

Location:
branches/script_engine/src/lib/util/executor
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/script_engine/src/lib/util/executor/executor_lua.cc

    r8387 r8388  
    1818#include "executor_lua.h"
    1919
    20 std::string temp;
     20std::string temp[5];
    2121
    2222template<typename type> type* fromLua(lua_State* state, int index) { type *obj = Lunar<type>::check(state, 1); lua_remove(state, 1); return obj;};
     
    2626template<> float fromLua<float>(lua_State* state, int index) { return (float)lua_tonumber(state, index); };
    2727template<> char fromLua<char>(lua_State* state, int index) { return (char)lua_tonumber(state, index); };
    28 template<> const std::string& fromLua<const std::string&>(lua_State* state, int index) { temp = lua_tostring(state, index); return temp; };
     28template<> const std::string& fromLua<const std::string&>(lua_State* state, int index) { temp[index] = lua_tostring(state, index); return temp[index]; };
    2929
    3030
  • branches/script_engine/src/lib/util/executor/executor_lua.h

    r8385 r8388  
    340340};
    341341
    342 
    343 
    344 
    345 
    346 
    347 
    348342#endif /* _EXECUTOR_LUA_H */
Note: See TracChangeset for help on using the changeset viewer.