diff options
author | bar@noter.(none) <> | 2005-05-10 14:13:58 +0500 |
---|---|---|
committer | bar@noter.(none) <> | 2005-05-10 14:13:58 +0500 |
commit | 8a5c6502caf55a317ba86957b0ed7260d04201a5 (patch) | |
tree | 00ceeb7d833c89802e843cecb1398b1ea595487b /strings | |
parent | b580a12d472d2019203972d7e6e7a15663f3598e (diff) | |
download | mariadb-git-8a5c6502caf55a317ba86957b0ed7260d04201a5.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; } |