Skip to content

Commit a84ae4c

Browse files
committed
Fix binary string reading in InternalReadStringMap
1 parent afeb30d commit a84ae4c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Shared/sdk/CScriptArgReader.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1039,7 +1039,8 @@ class CScriptArgReader
10391039
SStringMapValue value;
10401040
if (valueType == LUA_TSTRING || valueType == LUA_TNUMBER)
10411041
{
1042-
value = (lua_tostring(m_luaVM, -1));
1042+
uint uiLength = lua_strlen(m_luaVM, -1);
1043+
value.assign(lua_tostring(m_luaVM, -1), uiLength);
10431044
}
10441045
else if (valueType == LUA_TBOOLEAN)
10451046
{

0 commit comments

Comments
 (0)