aboutsummaryrefslogtreecommitdiff
path: root/lapi.c
diff options
context:
space:
mode:
Diffstat (limited to 'lapi.c')
-rw-r--r--lapi.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lapi.c b/lapi.c
index 7f85ebd5..5b866885 100644
--- a/lapi.c
+++ b/lapi.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lapi.c,v 2.204 2014/04/15 14:29:30 roberto Exp roberto $ 2** $Id: lapi.c,v 2.205 2014/04/15 16:32:49 roberto Exp roberto $
3** Lua API 3** Lua API
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -339,7 +339,7 @@ LUA_API int lua_strtonum (lua_State *L, const char *s, size_t len) {
339 setivalue(L->top, i); 339 setivalue(L->top, i);
340 } 340 }
341 else if (luaO_str2d(s, len, &n)) { /* else try as a float */ 341 else if (luaO_str2d(s, len, &n)) { /* else try as a float */
342 setnvalue(L->top, n); 342 setfltvalue(L->top, n);
343 } 343 }
344 else 344 else
345 return 0; /* conversion failed */ 345 return 0; /* conversion failed */
@@ -496,7 +496,7 @@ LUA_API void lua_pushnil (lua_State *L) {
496 496
497LUA_API void lua_pushnumber (lua_State *L, lua_Number n) { 497LUA_API void lua_pushnumber (lua_State *L, lua_Number n) {
498 lua_lock(L); 498 lua_lock(L);
499 setnvalue(L->top, n); 499 setfltvalue(L->top, n);
500 luai_checknum(L, L->top, 500 luai_checknum(L, L->top,
501 luaG_runerror(L, "C API - attempt to push a signaling NaN")); 501 luaG_runerror(L, "C API - attempt to push a signaling NaN"));
502 api_incr_top(L); 502 api_incr_top(L);