diff options
author | unknown <bar@noter.(none)> | 2005-05-10 14:13:58 +0500 |
---|---|---|
committer | unknown <bar@noter.(none)> | 2005-05-10 14:13:58 +0500 |
commit | a91cf275c872477242d8d036004abd521aaa0978 (patch) | |
tree | 00ceeb7d833c89802e843cecb1398b1ea595487b /strings | |
parent | 1fb790d3f096b43f67fdfb2ee9ddd8847d8bb1a6 (diff) | |
download | mariadb-git-a91cf275c872477242d8d036004abd521aaa0978.tar.gz |
bug#10344: some string function fail for UCS2
substr fix
Diffstat (limited to 'strings')
-rw-r--r-- | strings/ctype-ucs2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/strings/ctype-ucs2.c b/strings/ctype-ucs2.c index f5d0721fa9b..f12cfe3256e 100644 --- a/strings/ctype-ucs2.c +++ b/strings/ctype-ucs2.c @@ -1261,7 +1261,7 @@ uint my_charpos_ucs2(CHARSET_INFO *cs __attribute__((unused)), const char *e __attribute__((unused)), uint pos) { - return pos*2; + return pos > e - b ? e - b + 2 : pos * 2; } |