From 2c74295bfa5f749edd0f458ed9e8aadd23883bfe Mon Sep 17 00:00:00 2001
From: Kim Alvefur <zash@zash.se>
Date: Sun, 7 Aug 2016 20:49:50 +0200
Subject: util.table: Move loop variable to top of function for C89
 compatibility

---
 util-src/table.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/util-src/table.c b/util-src/table.c
index 423f8f29..63415541 100644
--- a/util-src/table.c
+++ b/util-src/table.c
@@ -7,10 +7,11 @@ static int Lcreate_table(lua_State* L) {
 }
 
 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);
-- 
cgit v1.2.3