소스 검색

[lua] put parens around the 0/0 NaN to avoid eval order issues

Simon Krajewski 9 년 전
부모
커밋
6ff2e31a96
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      std/lua/_std/Math.hx

+ 1 - 1
std/lua/_std/Math.hx

@@ -36,7 +36,7 @@ class Math
 
 	// Note: this has to be an untyped literal, otherwise the compiler tries
 	// to unify it to an Int, which defeats useful numeric reflection behavior.
-	static inline function get_NaN () : Float return untyped __lua__("0/0");
+	static inline function get_NaN () : Float return untyped __lua__("(0/0)");
 
 	public static function isNaN( f : Float ) : Bool return (f != f);
 	public static inline function isFinite( f : Float ) : Bool {