aboutsummaryrefslogtreecommitdiffstats
path: root/util-src/crand.c
diff options
context:
space:
mode:
Diffstat (limited to 'util-src/crand.c')
-rw-r--r--util-src/crand.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/util-src/crand.c b/util-src/crand.c
index fbdec8f8..177511ce 100644
--- a/util-src/crand.c
+++ b/util-src/crand.c
@@ -130,6 +130,9 @@ int Lseed(lua_State *L) {
#endif
int luaopen_util_crand(lua_State *L) {
+#if (LUA_VERSION_NUM > 501)
+ luaL_checkversion(L);
+#endif
lua_newtable(L);
lua_pushcfunction(L, Lrandom);
lua_setfield(L, -2, "bytes");