Browse Source

Fix: LuaValue (number equality)

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

+ 1 - 1
src/Lua/LuaValue.cs

@@ -319,7 +319,7 @@ public readonly struct LuaValue : IEquatable<LuaValue>
             LuaValueType.Nil => true,
             LuaValueType.Nil => true,
             LuaValueType.Boolean => Read<bool>().Equals(other.Read<bool>()),
             LuaValueType.Boolean => Read<bool>().Equals(other.Read<bool>()),
             LuaValueType.String => Read<string>().Equals(other.Read<string>()),
             LuaValueType.String => Read<string>().Equals(other.Read<string>()),
-            LuaValueType.Number => Read<double>().Equals(other.Read<double>()),
+            LuaValueType.Number => Read<double>() == other.Read<double>(),
             LuaValueType.Function => Read<LuaFunction>().Equals(other.Read<LuaFunction>()),
             LuaValueType.Function => Read<LuaFunction>().Equals(other.Read<LuaFunction>()),
             LuaValueType.Thread => Read<LuaThread>().Equals(other.Read<LuaThread>()),
             LuaValueType.Thread => Read<LuaThread>().Equals(other.Read<LuaThread>()),
             LuaValueType.Table => Read<LuaTable>().Equals(other.Read<LuaTable>()),
             LuaValueType.Table => Read<LuaTable>().Equals(other.Read<LuaTable>()),