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.

This commit is contained in:
Bastien Montagne 2014-01-07 20:56:45 +01:00
parent d490e686f0
commit ab2bb94f6b
1 changed files with 2 additions and 0 deletions

View File

@ -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);
}
}