]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: lua: type error in the arguments wrapper
authorThierry FOURNIER <tfournier@arpalert.org>
Mon, 6 Jul 2015 22:41:29 +0000 (00:41 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 10 Jul 2015 14:29:31 +0000 (16:29 +0200)
The expected arguments time and size are returned as int. This patch
fix this bug and returns the expected type.

src/hlua.c

index 026dd2f3324f051cdd79ef358a84669b0a4b1826..a5df204e069c92e9e62070bf0fee4ee60f97d9e1 100644 (file)
@@ -619,13 +619,13 @@ __LJMP int hlua_lua2arg_check(lua_State *L, int first, struct arg *argp,
                case ARGT_TIME:
                        if (argp[idx].type != ARGT_SINT)
                                WILL_LJMP(luaL_argerror(L, first + idx, "integer expected"));
-                       argp[idx].type = ARGT_SINT;
+                       argp[idx].type = ARGT_TIME;
                        break;
 
                case ARGT_SIZE:
                        if (argp[idx].type != ARGT_SINT)
                                WILL_LJMP(luaL_argerror(L, first + idx, "integer expected"));
-                       argp[idx].type = ARGT_SINT;
+                       argp[idx].type = ARGT_SIZE;
                        break;
 
                case ARGT_FE: