Skip to content

Commit

Permalink
Small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
TheNormalnij committed Jun 16, 2024
1 parent a1e94e8 commit 69dd233
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Shared/mods/deathmatch/logic/lua/LuaBasic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@ namespace lua
template <>
std::string PopPrimitive<std::string>(lua_State* L, int& index)
{
size_t uiLength;
const char* str = lua_tolstring(L, index++, &uiLength);
std::string outValue;
outValue.assign(str, uiLength);
size_t length;
const char* str = lua_tolstring(L, index++, &length);
std::string outValue(str, length);
return outValue;
}

Expand Down

0 comments on commit 69dd233

Please sign in to comment.