shithub: libmujs

Download patch

ref: e107fcf8ca813cd64ffe8b28a81011d5e9b7fc7e
parent: 790103815fb3c5299c1b4afd2f7075dc0aca4a17
author: Szabolcs Nagy <nsz@port70.net>
date: Thu Oct 16 17:40:37 EDT 2014

Fix Math.abs to use fabs instead of int abs

--- a/jsmath.c
+++ b/jsmath.c
@@ -4,7 +4,7 @@
 
 static void Math_abs(js_State *J)
 {
-	js_pushnumber(J, abs(js_tonumber(J, 1)));
+	js_pushnumber(J, fabs(js_tonumber(J, 1)));
 }
 
 static void Math_acos(js_State *J)