util-src/crand.c
changeset 7821 54669df178c2
parent 7442 4cccaa33b0a1
child 7826 9b66ada1487c
--- a/util-src/crand.c	Fri Jan 06 13:14:17 2017 +0100
+++ b/util-src/crand.c	Sun Jan 08 14:21:08 2017 +0100
@@ -130,6 +130,9 @@
 #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");