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.master
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