LuaState can push strings with embedded NULs.
This also marginally improves performance, since a strlen() isn't called (inside lua_pushstring()), the string length is stored in the AString object directly.
This commit is contained in:
parent
748fd86b83
commit
bcd41dc1aa
@ -297,7 +297,7 @@ void cLuaState::Push(const AString & a_String)
|
||||
{
|
||||
ASSERT(IsValid());
|
||||
|
||||
tolua_pushcppstring(m_LuaState, a_String);
|
||||
lua_pushlstring(m_LuaState, a_String.data(), a_String.size());
|
||||
m_NumCurrentFunctionArgs += 1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user