From 76676f3a2e8aeaf273b6b4337f2e4f4a181943c2 Mon Sep 17 00:00:00 2001 From: CTCaer Date: Wed, 18 Mar 2020 06:30:11 +0200 Subject: [PATCH] nyx: Allow for big filepaths for archive bit fixer It also fixes corruptions/hangs when path is bigger than 255 chars --- nyx/nyx_gui/frontend/gui_tools.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nyx/nyx_gui/frontend/gui_tools.c b/nyx/nyx_gui/frontend/gui_tools.c index 62b455a..c586ea2 100644 --- a/nyx/nyx_gui/frontend/gui_tools.c +++ b/nyx/nyx_gui/frontend/gui_tools.c @@ -264,7 +264,7 @@ static lv_res_t _create_window_unset_abit_tool(lv_obj_t *btn) lv_obj_t * lb_val = lv_label_create(val, lb_desc); - char path[256]; + char *path = malloc(1024); path[0] = 0; lv_label_set_static_text(lb_val, ""); @@ -302,6 +302,8 @@ static lv_res_t _create_window_unset_abit_tool(lv_obj_t *btn) lv_label_set_text(lb_desc2, txt_buf); lv_obj_set_width(lb_desc2, lv_obj_get_width(desc2)); lv_obj_align(desc2, val, LV_ALIGN_OUT_BOTTOM_RIGHT, 0, 0); + + free(path); } // Enable buttons.