# HG changeset patch # User Kim Alvefur # Date 1470595790 -7200 # Node ID a3a4ed0d34f4cdd81eecd29819b1781854fe2ea0 # Parent a0813737c6fa8ad48d2f5720f3fb04d56f9df008 util.table: Move loop variable to top of function for C89 compatibility diff -r a0813737c6fa -r a3a4ed0d34f4 util-src/table.c --- a/util-src/table.c Sun Aug 07 20:48:37 2016 +0200 +++ b/util-src/table.c Sun Aug 07 20:49:50 2016 +0200 @@ -7,10 +7,11 @@ } static int Lpack(lua_State* L) { + int arg; unsigned int n_args = lua_gettop(L); lua_createtable(L, n_args, 1); lua_insert(L, 1); - for(int arg = n_args; arg >= 1; arg--) { + for(arg = n_args; arg >= 1; arg--) { lua_rawseti(L, 1, arg); } lua_pushinteger(L, n_args);