From 7181ae5f4fd54180685d328158dd71af296bfe7e Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 20 Jan 2017 11:41:07 +0100 Subject: util.crand: Switch to luaL_checkinteger since checkint is deprecated in Lua 5.3 --- util-src/crand.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/util-src/crand.c b/util-src/crand.c index 177511ce..547ceb55 100644 --- a/util-src/crand.c +++ b/util-src/crand.c @@ -57,7 +57,7 @@ int Lrandom(lua_State *L) { unsigned char *buf; #endif int ret = 0; - size_t len = (size_t)luaL_checkint(L, 1); + size_t len = (size_t)luaL_checkinteger(L, 1); #ifdef BUFLEN len = len > BUFLEN ? BUFLEN : len; #else @@ -71,6 +71,7 @@ int Lrandom(lua_State *L) { */ return 2; } + #endif #if defined(WITH_GETRANDOM) -- cgit v1.2.3