Diff

util-src/crand.c @ 7969:1c6a07606309

util-src: Specify size of various tables to be allocated
author Kim Alvefur <zash@zash.se>
date Thu, 09 Mar 2017 01:20:59 +0100
parent 7934:485b9e66fedf
child 8127:3e443d6791e6
line wrap: on
line diff
--- a/util-src/crand.c	Thu Mar 09 00:59:32 2017 +0100
+++ b/util-src/crand.c	Thu Mar 09 01:20:59 2017 +0100
@@ -100,7 +100,7 @@
 	luaL_checkversion(L);
 #endif
 
-	lua_newtable(L);
+	lua_createtable(L, 0, 2);
 	lua_pushcfunction(L, Lrandom);
 	lua_setfield(L, -2, "bytes");