From 0047780b3bc6a83348f5dc0677e6ac7981541112 Mon Sep 17 00:00:00 2001 From: Tom van Dijck Date: Thu, 17 Mar 2016 14:23:17 -0700 Subject: [PATCH] fix path_translate for old compilers. --- src/host/path_translate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/host/path_translate.c b/src/host/path_translate.c index 77b4c32f..ef06665a 100644 --- a/src/host/path_translate.c +++ b/src/host/path_translate.c @@ -28,6 +28,7 @@ static void translate(char* result, const char* value, const char sep) int path_translate(lua_State* L) { + const char* os; const char* sep; char buffer[0x4000]; @@ -36,7 +37,7 @@ int path_translate(lua_State* L) lua_getglobal(L, "os"); lua_getfield(L, -1, "get"); lua_call(L, 0, 1); - const char* os = luaL_checkstring(L, -1); + os = luaL_checkstring(L, -1); lua_pop(L, 2); // Use target OS separator