From 9945253d57a5d328308c543a3c08334512aaf364 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 6 Jan 2016 11:43:05 -0200 Subject: [PATCH] details (comments + text of error messages) --- loslib.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/loslib.c b/loslib.c index b043f679..b04a46d8 100644 --- a/loslib.c +++ b/loslib.c @@ -1,5 +1,5 @@ /* -** $Id: loslib.c,v 1.59 2015/07/06 15:16:51 roberto Exp roberto $ +** $Id: loslib.c,v 1.60 2015/11/19 19:16:22 roberto Exp roberto $ ** Standard Operating System library ** See Copyright Notice in lua.h */ @@ -210,18 +210,18 @@ static int getboolfield (lua_State *L, const char *key) { static int getfield (lua_State *L, const char *key, int d, int delta) { int isnum; - int t = lua_getfield(L, -1, key); + int t = lua_getfield(L, -1, key); /* get field and its type */ lua_Integer res = lua_tointegerx(L, -1, &isnum); - if (!isnum) { /* field is not a number? */ + if (!isnum) { /* field is not an integer? */ if (t != LUA_TNIL) /* some other value? */ - return luaL_error(L, "field '%s' not an integer", key); + return luaL_error(L, "field '%s' is not an integer", key); else if (d < 0) /* absent field; no default? */ return luaL_error(L, "field '%s' missing in date table", key); res = d; } else { if (!(-L_MAXDATEFIELD <= res && res <= L_MAXDATEFIELD)) - return luaL_error(L, "field '%s' out-of-bounds", key); + return luaL_error(L, "field '%s' is out-of-bound", key); res -= delta; } lua_pop(L, 1);