Skip to content

Commit

Permalink
WHOOPS!
Browse files Browse the repository at this point in the history
  • Loading branch information
nkrapivin committed Feb 1, 2021
1 parent d8a1bb8 commit a52518d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
/libLassebq/Debug
/Release
/libLassebq/Release
.vs/
.vs/
libLassebq.VC.db
5 changes: 3 additions & 2 deletions libLassebq/GMLua.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -579,9 +579,10 @@ void RegisterScripts(lua_State* _pL)
{
const YYGMLFunc& func = g_GMLScripts[i];
const std::string fname(func.pName);
if (fname.rfind("gml_Script_") != std::string::npos)
const std::string prefix("gml_Script_");
if (fname.rfind(prefix) != std::string::npos)
{
const std::string luaName("GMLScript_" + fname);
const std::string luaName("GMLScript_" + fname.substr(prefix.length()));
lua_pushinteger(_pL, i);
lua_pushcclosure(_pL, lua_GMLua_script_cclosure, 1);
lua_setglobal(_pL, luaName.c_str());
Expand Down

0 comments on commit a52518d

Please sign in to comment.