From c2e3322fc60e7d69bb0f519797c41cb0898113ee Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Wed, 8 Aug 2018 09:28:42 +0200 Subject: pposix: Generate an error when a passed string isn?t "unlimited". --- util-src/pposix.c | 1 + 1 file changed, 1 insertion(+) (limited to 'util-src') diff --git a/util-src/pposix.c b/util-src/pposix.c index 435af6f0..f9a60600 100644 --- a/util-src/pposix.c +++ b/util-src/pposix.c @@ -552,6 +552,7 @@ rlim_t arg_to_rlimit(lua_State *L, int idx, rlim_t current) { if(strcmp(lua_tostring(L, idx), "unlimited") == 0) { return RLIM_INFINITY; } + return luaL_argerror(L, idx, "unexpected type"); case LUA_TNUMBER: return lua_tointeger(L, idx); -- cgit v1.2.3