Skip to content

Commit

Permalink
For some reason, in the 2003 emulator, HUGE_VAL is negative. Use DBL_…
Browse files Browse the repository at this point in the history
…MAX instead.

Signed-off-by: Petr Štetiar <[email protected]>
  • Loading branch information
gwell authored and ynezz committed Sep 11, 2009
1 parent b5da1a9 commit cccd831
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lmathlib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit cccd831

Please sign in to comment.