[ab2bb94] master: 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.
Bastien Montagne
noreply at git.blender.org
Tue Jan 7 20:57:34 CET 2014
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);
}
}
More information about the Bf-blender-cvs
mailing list