Skip to content

Commit

Permalink
unity的.net 4下,object obj = new sbyte[] { 1, 2 };obj is byte[]会判断为true…
Browse files Browse the repository at this point in the history
…,修改为兼容性更好的写法,防止sbyte[] 在.net 4下push到lua变成字符串
  • Loading branch information
chexiongsheng committed Jul 19, 2019
1 parent 7c975b5 commit d549ca8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Assets/XLua/Src/ObjectTranslator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1148,7 +1148,7 @@ public void PushAny(RealStatePtr L, object o)
{
LuaAPI.lua_pushstring(L, o as string);
}
else if (o is byte[])
else if (type == typeof(byte[]))
{
LuaAPI.lua_pushstring(L, o as byte[]);
}
Expand Down

0 comments on commit d549ca8

Please sign in to comment.