Skip to content

Commit

Permalink
修复 传入 空name 导致的闪退
Browse files Browse the repository at this point in the history
  • Loading branch information
leinlin committed Jul 2, 2020
1 parent ef007cd commit 8d1b2ff
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions LuaProfiler/example/Assets/LuaProfiler/Core/Driver/LuaDLL.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1088,6 +1088,10 @@ public static int luaL_loadbufferx_replace(IntPtr luaState, IntPtr buff, IntPtr
{
if (isHook)
{
if (name == null)
{
name = "chunk";
}
byte[] buffer = new byte[(int)size];
Marshal.Copy(buff, buffer, 0, buffer.Length);

Expand Down

0 comments on commit 8d1b2ff

Please sign in to comment.