mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-19 16:18:45 +00:00
SWORD25: Make Lua package registering more robust.
svn-id: r53242
This commit is contained in:
parent
4b1b3e5034
commit
06fc35ffe8
@ -325,11 +325,11 @@ bool BS_LuaBindhelper::GetMetatable(lua_State *L, const Common::String &TableNam
|
||||
bool BS_LuaBindhelper::_CreateTable(lua_State *L, const Common::String &TableName) {
|
||||
const char *PartBegin = TableName.c_str();
|
||||
|
||||
while (*PartBegin) {
|
||||
while (PartBegin - TableName.c_str() < (int)TableName.size()) {
|
||||
const char *PartEnd = strchr(PartBegin, '.');
|
||||
if (!PartEnd)
|
||||
PartEnd = PartBegin + strlen(PartBegin);
|
||||
Common::String SubTableName(PartBegin, PartEnd - PartBegin);
|
||||
Common::String SubTableName(PartBegin, PartEnd);
|
||||
|
||||
// Tables with an empty string as the name are not allowed
|
||||
if (SubTableName.size() == 0)
|
||||
|
Loading…
Reference in New Issue
Block a user