From 6e683783f41e3d8fd8494e7c9d234f4e8b5876da Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Thu, 29 Aug 2019 17:32:26 +0200 Subject: Fix another compiler warning (STR 3529) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fluid/template_panel.{fl|cxx}: .../fluid/template_panel.cxx:261:44: warning: ā€˜%s’ directive output may be truncated writing up to 255 bytes into a region of size between 0 and 1023 [-Wformat-truncation=] Solution: increase buffer size from 1024 to 1400. --- fluid/template_panel.cxx | 2 +- fluid/template_panel.fl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fluid/template_panel.cxx b/fluid/template_panel.cxx index c40128300..839ab1f2c 100644 --- a/fluid/template_panel.cxx +++ b/fluid/template_panel.cxx @@ -213,7 +213,7 @@ void template_delete_cb(Fl_Button *, void *) { void template_load() { int i; - char name[1024], filename[1024], path[1024], *ptr; + char name[1024], filename[1400], path[1024], *ptr; struct dirent **files; int num_files; diff --git a/fluid/template_panel.fl b/fluid/template_panel.fl index e7d8b35cb..2bc7625db 100644 --- a/fluid/template_panel.fl +++ b/fluid/template_panel.fl @@ -209,7 +209,7 @@ template_browser->do_callback();} {} Function {template_load()} {open return_type void } { code {int i; -char name[1024], filename[1024], path[1024], *ptr; +char name[1024], filename[1400], path[1024], *ptr; struct dirent **files; int num_files; -- cgit v1.2.3