diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2014-01-07 23:56:45 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2014-01-07 23:56:45 +0400 |
commit | ab2bb94f6bd2439b2eeaded60097da6737e158c8 (patch) | |
tree | 913b71fb8b01dd7c9c5f42363b1d3a5e523b56f7 /source/blender | |
parent | d490e686f03ce75ab3f58a24bd0e6b8ff82a10ca (diff) |
Fix a small glitch with string generated by numinput, they could cut multi-bytes utf8 chars (like the '°' of angle values), now call BLI_utf8_invalid_strip() to prevent this.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/util/numinput.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/editors/util/numinput.c b/source/blender/editors/util/numinput.c index 57ae95d1305..fbf1262c4d6 100644 --- a/source/blender/editors/util/numinput.c +++ b/source/blender/editors/util/numinput.c @@ -115,6 +115,8 @@ void outputNumInput(NumInput *n, char *str) const char *cur = (i == n->idx) ? "|" : ""; BLI_snprintf(&str[j * ln], ln, "%sNONE%s", cur, cur); } + /* We might have cut some multi-bytes utf8 chars (e.g. trailing '°' of degrees values can become only 'A')... */ + BLI_utf8_invalid_strip(&str[j * ln], ln); } } |