diff --git a/src/lua_script.c b/src/lua_script.c index 6fc1a48d4..f134c0d68 100644 --- a/src/lua_script.c +++ b/src/lua_script.c @@ -356,10 +356,16 @@ int LUA_PushGlobals(lua_State *L, const char *word) lua_pushinteger(L, gravity); return 1; } else if (fastcmp(word,"VERSION")) { - lua_pushinteger(L, VERSION); + if (lua_compatmode) + lua_pushinteger(L, 1); + else + lua_pushinteger(L, VERSION); return 1; } else if (fastcmp(word,"SUBVERSION")) { - lua_pushinteger(L, SUBVERSION); + if (lua_compatmode) + lua_pushinteger(L, 6); + else + lua_pushinteger(L, SUBVERSION); return 1; } else if (fastcmp(word,"VERSIONSTRING")) { lua_pushstring(L, VERSIONSTRING);