Skip to content

Commit

Permalink
Make MetaDataRef:get return nil instead of nothing (#11666)
Browse files Browse the repository at this point in the history
  • Loading branch information
TurkeyMcMac committed Oct 5, 2021
1 parent 4fca601 commit 5aa95fe
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/script/lua_api/l_metadata.cpp
Expand Up @@ -82,9 +82,10 @@ int MetaDataRef::l_get(lua_State *L)
std::string str;
if (meta->getStringToRef(name, str)) {
lua_pushlstring(L, str.c_str(), str.size());
return 1;
} else {
lua_pushnil(L);
}
return 0;
return 1;
}

// get_string(self, name)
Expand Down

0 comments on commit 5aa95fe

Please sign in to comment.