Browse Source

Fix another compiler warning (STR 3529)

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.
pull/36/head
Albrecht Schlosser 6 years ago
parent
commit
6e683783f4
  1. 2
      fluid/template_panel.cxx
  2. 2
      fluid/template_panel.fl

2
fluid/template_panel.cxx

@ -213,7 +213,7 @@ void template_delete_cb(Fl_Button *, void *) { @@ -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;

2
fluid/template_panel.fl

@ -209,7 +209,7 @@ template_browser->do_callback();} {} @@ -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;

Loading…
Cancel
Save