diff options
-rw-r--r-- | libcrystfel/src/symmetry.c | 4 | ||||
-rw-r--r-- | src/dw-hdfsee.c | 9 |
2 files changed, 8 insertions, 5 deletions
diff --git a/libcrystfel/src/symmetry.c b/libcrystfel/src/symmetry.c index 4cc1e63e..897d134f 100644 --- a/libcrystfel/src/symmetry.c +++ b/libcrystfel/src/symmetry.c @@ -1736,8 +1736,8 @@ char *get_matrix_name(const IntegerMatrix *m, int row) } if ( abs(v) > 1 ) { - char num[3]; - snprintf(num, 2, "%i", abs(v)); + char num[11]; + snprintf(num, 11, "%i", abs(v)); add_chars(text, num, max_len); } diff --git a/src/dw-hdfsee.c b/src/dw-hdfsee.c index c943cfdf..c1bb39cc 100644 --- a/src/dw-hdfsee.c +++ b/src/dw-hdfsee.c @@ -2626,9 +2626,12 @@ static void calibmode_press(DisplayWindow *dw, GdkEventButton *event) if ( revmap_return_value == 0 ) { fs = dfs; ss = dss; - snprintf(statusbar_string, 80, - "Last clicked position: x: %i, y: %i, fs: %u, ss: %u," - " (panel %s)", x, y, fs, ss, p->name); + if ( snprintf(statusbar_string, 80, + "Last clicked position: x: %i, y: %i, fs: %u, ss: %u," + " (panel %s)", x, y, fs, ss, p->name) != 0 ) + { + ERROR("Panel name is too long for status bar.\n"); + } } gtk_statusbar_push(GTK_STATUSBAR(dw->statusbar), cc, statusbar_string); } |