"...KeraLua.1.0.27/runtimes/linux-x64/native/liblua53.so" did not exist on "d975f8e96b97513a8b9ed6040d6dec294debbcf8"
Commit e8e06157 authored by charlenni's avatar charlenni
Browse files

Change lua_tostring to use ToString(strlen) instead of ToString().


Signed-off-by: default avatarcharlenni <web@weltz-online.de>
parent 712b6589
......@@ -334,7 +334,13 @@ namespace NLua
return string.Format ("{0}", lua_tonumber (luaState, index));
else if (t == LuaTypes.String) {
uint strlen;
return LuaCore.lua_tolstring (luaState, index, out strlen).ToString ();
// Changed 2013-05-18 by Dirk Weltz
// Changed because binary chunks, which are also transfered as strings
// get corrupted by conversion to strings because of the encoding.
// So we use the ToString method with string length, so it could be checked,
// if string is a binary chunk and if, could transfered to string without
// encoding.
return LuaCore.lua_tolstring (luaState, index, out strlen).ToString ((int)strlen);
} else if (t == LuaTypes.Nil)
return null; // treat lua nulls to as C# nulls
else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment