aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2018-06-10 14:28:09 +0200
committerThomas White <taw@physics.org>2018-06-10 15:36:44 +0200
commit1bb822001ee92a5d73f20ae8f6ccaf2c29947144 (patch)
treeff7c103c12d950efec9a9fe86d1775683a490eef /src
parentbf626f98ff9d57e9feed52cb38708d4048b685d8 (diff)
hdfsee: Fix statusbar snprintf() nonsense
Diffstat (limited to 'src')
-rw-r--r--src/dw-hdfsee.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/dw-hdfsee.c b/src/dw-hdfsee.c
index c5c4d85a..15efe8d3 100644
--- a/src/dw-hdfsee.c
+++ b/src/dw-hdfsee.c
@@ -2610,7 +2610,7 @@ static void calibmode_press(DisplayWindow *dw, GdkEventButton *event)
int x,y;
double dfs, dss;
int fs, ss, revmap_return_value;
- char statusbar_string[80];
+ char statusbar_string[256];
guint cc;
struct panel *p;
@@ -2629,9 +2629,9 @@ static void calibmode_press(DisplayWindow *dw, GdkEventButton *event)
if ( revmap_return_value == 0 ) {
fs = dfs;
ss = dss;
- if ( snprintf(statusbar_string, 80,
+ if ( snprintf(statusbar_string, 256,
"Last clicked position: x: %i, y: %i, fs: %u, ss: %u,"
- " (panel %s)", x, y, fs, ss, p->name) != 0 )
+ " (panel %s)", x, y, fs, ss, p->name) >= 256 )
{
ERROR("Panel name is too long for status bar.\n");
}