Commit: ab2bb94f6bd2439b2eeaded60097da6737e158c8
Author: Bastien Montagne
Date:   Tue Jan 7 20:56:45 2014 +0100
https://developer.blender.org/rBab2bb94f6bd2439b2eeaded60097da6737e158c8

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.

===================================================================

M       source/blender/editors/util/numinput.c

===================================================================

diff --git a/source/blender/editors/util/numinput.c 
b/source/blender/editors/util/numinput.c
index 57ae95d..fbf1262 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);
        }
 }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to