diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2013-03-07 15:21:32 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2013-03-07 15:21:32 -0300 |
| commit | 8830901a9cbb2bf12120d9a205966496095cc3f2 (patch) | |
| tree | bdbcfc82cb81691e4975add030803921b4c42ccd | |
| parent | 15a3738b4994cc8bbe23d73d640743338ae22b02 (diff) | |
| download | lua-8830901a9cbb2bf12120d9a205966496095cc3f2.tar.gz lua-8830901a9cbb2bf12120d9a205966496095cc3f2.tar.bz2 lua-8830901a9cbb2bf12120d9a205966496095cc3f2.zip | |
second parameter to 'ldexp' is an integer
Diffstat (limited to '')
| -rw-r--r-- | lmathlib.c | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lmathlib.c,v 1.81 2012/05/18 17:47:53 roberto Exp roberto $ | 2 | ** $Id: lmathlib.c,v 1.82 2013/01/29 16:00:40 roberto Exp roberto $ |
| 3 | ** Standard mathematical library | 3 | ** Standard mathematical library |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -160,7 +160,7 @@ static int math_frexp (lua_State *L) { | |||
| 160 | 160 | ||
| 161 | static int math_ldexp (lua_State *L) { | 161 | static int math_ldexp (lua_State *L) { |
| 162 | lua_Number x = luaL_checknumber(L, 1); | 162 | lua_Number x = luaL_checknumber(L, 1); |
| 163 | lua_Number ep = luaL_checknumber(L, 2); | 163 | int ep = luaL_checkint(L, 2); |
| 164 | lua_pushnumber(L, l_mathop(ldexp)(x, ep)); | 164 | lua_pushnumber(L, l_mathop(ldexp)(x, ep)); |
| 165 | return 1; | 165 | return 1; |
| 166 | } | 166 | } |
