diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile | 2 | ||||
-rw-r--r-- | src/textadept.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/Makefile b/src/Makefile index 729e10b4..7c89335e 100644 --- a/src/Makefile +++ b/src/Makefile @@ -65,7 +65,7 @@ CFLAGS = -std=c99 $(DEBUG_FLAG) -O $(PLAT_FLAGS) $(INCLUDEDIRS) -W -Wall \ GTKFLAGS = $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKG_CONFIG) \ --cflags gtk+-2.0) GTKLIBS = $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKG_CONFIG) \ - --libs gtk+-2.0 gthread-2.0) + --libs gtk+-2.0) ifdef OSX GTKLIBS += -framework Carbon -framework Cocoa -ligemacintegration endif diff --git a/src/textadept.c b/src/textadept.c index ba32e109..9acb50ae 100644 --- a/src/textadept.c +++ b/src/textadept.c @@ -1950,7 +1950,7 @@ static int l_cf_gui_dialog(lua_State *lua) { int i, j, k, n = lua_gettop(lua) - 1, argc = n; for (i = 2; i < n + 2; i++) if (lua_type(lua, i) == LUA_TTABLE) argc += lua_objlen(lua, i) - 1; - const char *argv[argc]; + const char **argv = malloc(argc * sizeof(const char *)); for (i = 0, j = 2; j < n + 2; j++) if (lua_type(lua, j) == LUA_TTABLE) { int len = lua_objlen(lua, j); @@ -1963,6 +1963,7 @@ static int l_cf_gui_dialog(lua_State *lua) { char *out = gcocoadialog(type, argc, argv); lua_pushstring(lua, out); free(out); + free(argv); return 1; } |