diff options
Diffstat (limited to 'strings/ctype-tis620.c')
-rw-r--r-- | strings/ctype-tis620.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/strings/ctype-tis620.c b/strings/ctype-tis620.c index 80af8e2014b..c6bdd106ad4 100644 --- a/strings/ctype-tis620.c +++ b/strings/ctype-tis620.c @@ -638,9 +638,13 @@ int my_strnxfrm_tis620(CHARSET_INFO *cs __attribute__((unused)), uchar * dest, uint len, const uchar * src, uint srclen) { + uint dstlen= len; len= (uint) (strmake((char*) dest, (char*) src, min(len, srclen)) - (char*) dest); - return (int) thai2sortable(dest, len); + len= thai2sortable(dest, len); + if (dstlen > len) + bfill(dest + len, dstlen - len, ' '); + return dstlen; } |