Explorar el Código

[lua] fix toString behavior in the case of -0 (fix #6652)

Justin Donaldson hace 8 años
padre
commit
1a87a1e444
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  1. 1 0
      std/lua/Boot.hx

+ 1 - 0
std/lua/Boot.hx

@@ -182,6 +182,7 @@ class Boot {
 			case "number" : {
 				if (o == std.Math.POSITIVE_INFINITY) "Infinity";
 				else if (o == std.Math.NEGATIVE_INFINITY) "-Infinity";
+				else if (o == 0) "0";
 				else if (o != o) "NaN";
 				else untyped tostring(o);
 			}