diff options
author | Kim Alvefur <zash@zash.se> | 2017-01-20 11:41:07 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2017-01-20 11:41:07 +0100 |
commit | 7181ae5f4fd54180685d328158dd71af296bfe7e (patch) | |
tree | c85d7821ac66d0252434618fa8ad29ed8f170919 /util-src/crand.c | |
parent | 4d644d2c03246c3dcb2937475965e7f849a053b4 (diff) | |
download | prosody-7181ae5f4fd54180685d328158dd71af296bfe7e.tar.gz prosody-7181ae5f4fd54180685d328158dd71af296bfe7e.zip |
util.crand: Switch to luaL_checkinteger since checkint is deprecated in Lua 5.3
Diffstat (limited to 'util-src/crand.c')
-rw-r--r-- | util-src/crand.c | 3 |
1 files changed, 2 insertions, 1 deletions
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) |