Browse Source

Fix: userdata comparison

AnnulusGames 1 year ago
parent
commit
09fe34a9fb
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/Lua/LuaValue.cs

+ 1 - 1
src/Lua/LuaValue.cs

@@ -323,7 +323,7 @@ public readonly struct LuaValue : IEquatable<LuaValue>
             LuaValueType.Function => Read<LuaFunction>().Equals(other.Read<LuaFunction>()),
             LuaValueType.Thread => Read<LuaThread>().Equals(other.Read<LuaThread>()),
             LuaValueType.Table => Read<LuaTable>().Equals(other.Read<LuaTable>()),
-            LuaValueType.UserData => referenceValue == other.referenceValue,
+            LuaValueType.UserData => Read<LuaUserData>().Equals(other.Read<LuaUserData>()),
             _ => false,
         };
     }