aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/symmetry.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2017-11-23 16:43:24 +0100
committerThomas White <taw@physics.org>2017-11-23 16:44:36 +0100
commit5f2dd7f6d79f7e0d11012d2f85b68c774c6e95ee (patch)
tree33fe87e6648f50f89623fbbae84c8d8f7acec75b /libcrystfel/src/symmetry.c
parent4e8858bcb532a3c90844c48194792237f611d524 (diff)
Avoid truncation with snprintf
Just something that came from new compiler warnings after upgrading my system.
Diffstat (limited to 'libcrystfel/src/symmetry.c')
-rw-r--r--libcrystfel/src/symmetry.c4
1 files changed, 2 insertions, 2 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);
}