diff options
| -rw-r--r-- | ltests.c | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ltests.c,v 2.241 2018/02/20 16:52:50 roberto Exp roberto $ | 2 | ** $Id: ltests.c,v 2.242 2018/02/23 13:13:31 roberto Exp roberto $ |
| 3 | ** Internal Module for Debugging of the Lua Implementation | 3 | ** Internal Module for Debugging of the Lua Implementation |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -957,13 +957,13 @@ static int doonnewstack (lua_State *L) { | |||
| 957 | 957 | ||
| 958 | 958 | ||
| 959 | static int s2d (lua_State *L) { | 959 | static int s2d (lua_State *L) { |
| 960 | lua_pushnumber(L, *cast(const double *, luaL_checkstring(L, 1))); | 960 | lua_pushnumber(L, cast_num(*cast(const double *, luaL_checkstring(L, 1)))); |
| 961 | return 1; | 961 | return 1; |
| 962 | } | 962 | } |
| 963 | 963 | ||
| 964 | 964 | ||
| 965 | static int d2s (lua_State *L) { | 965 | static int d2s (lua_State *L) { |
| 966 | double d = luaL_checknumber(L, 1); | 966 | double d = cast(double, luaL_checknumber(L, 1)); |
| 967 | lua_pushlstring(L, cast_charp(&d), sizeof(d)); | 967 | lua_pushlstring(L, cast_charp(&d), sizeof(d)); |
| 968 | return 1; | 968 | return 1; |
| 969 | } | 969 | } |
