From cccd831468629950c46b09e2dbd45b843b50d5cc Mon Sep 17 00:00:00 2001 From: gwell Date: Sat, 16 May 2009 03:11:27 +0800 Subject: [PATCH] For some reason, in the 2003 emulator, HUGE_VAL is negative. Use DBL_MAX instead. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Petr Štetiar --- src/lmathlib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lmathlib.c b/src/lmathlib.c index 441fbf7..81d7ee3 100644 --- a/src/lmathlib.c +++ b/src/lmathlib.c @@ -252,7 +252,7 @@ LUALIB_API int luaopen_math (lua_State *L) { luaL_register(L, LUA_MATHLIBNAME, mathlib); lua_pushnumber(L, PI); lua_setfield(L, -2, "pi"); - lua_pushnumber(L, HUGE_VAL); + lua_pushnumber(L, DBL_MAX); lua_setfield(L, -2, "huge"); #if defined(LUA_COMPAT_MOD) lua_getfield(L, -1, "fmod");