瀏覽代碼

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

Justin Donaldson 8 年之前
父節點
當前提交
1a87a1e444
共有 1 個文件被更改,包括 1 次插入0 次删除
  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);
 			}