aboutsummaryrefslogtreecommitdiff
path: root/lauxlib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lauxlib.c')
-rw-r--r--lauxlib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lauxlib.c b/lauxlib.c
index 563362e5..263d9f80 100644
--- a/lauxlib.c
+++ b/lauxlib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lauxlib.c,v 1.264 2014/06/26 17:25:11 roberto Exp roberto $ 2** $Id: lauxlib.c,v 1.265 2014/07/16 14:51:36 roberto Exp roberto $
3** Auxiliary functions for building Lua libraries 3** Auxiliary functions for building Lua libraries
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -396,8 +396,8 @@ LUALIB_API lua_Number luaL_optnumber (lua_State *L, int arg, lua_Number def) {
396 396
397 397
398static void interror (lua_State *L, int arg) { 398static void interror (lua_State *L, int arg) {
399 if (lua_type(L, arg) == LUA_TNUMBER) 399 if (lua_isnumber(L, arg))
400 luaL_argerror(L, arg, "float value out of integer range"); 400 luaL_argerror(L, arg, "number has no integer representation");
401 else 401 else
402 tag_error(L, arg, LUA_TNUMBER); 402 tag_error(L, arg, LUA_TNUMBER);
403} 403}