diff options
author | Thomas White <taw@physics.org> | 2012-10-17 15:09:17 -0700 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-10-17 15:09:17 -0700 |
commit | 3e34ddc0c44fa31398715413cd6ad973222ec949 (patch) | |
tree | d284f93da082e6970e3063b9e205b6a23a95623b /libcrystfel | |
parent | 8bcd74a239b125d13c3de76867e684b77cbb5e3b (diff) |
describe_symmetry: Add commas when needed
Diffstat (limited to 'libcrystfel')
-rw-r--r-- | libcrystfel/src/symmetry.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libcrystfel/src/symmetry.c b/libcrystfel/src/symmetry.c index bff64b57..03f04bbd 100644 --- a/libcrystfel/src/symmetry.c +++ b/libcrystfel/src/symmetry.c @@ -1658,7 +1658,11 @@ static char *name_equiv(const struct sym_op *op) l = get_matrix_name(op->l); name = malloc(32); - snprintf(name, 31, "%s%s%s", h, k, l); + if ( strlen(h)+strlen(k)+strlen(l) == 3 ) { + snprintf(name, 31, "%s%s%s", h, k, l); + } else { + snprintf(name, 31, "%s,%s,%s", h, k, l); + } free(h); free(k); free(l); |