diff options
author | kaa@polly.(none) <> | 2007-10-23 13:19:54 +0400 |
---|---|---|
committer | kaa@polly.(none) <> | 2007-10-23 13:19:54 +0400 |
commit | 5fe9f0f7dde0ba59333a80d96ab3a665171b04a1 (patch) | |
tree | 232aedbfbe8c6aab6ae751cc9fd7663e6044a655 /strings | |
parent | 7bd5aa9bd65913e9b43e75943d0f215c6c07e589 (diff) | |
parent | e0691da0c199ab2c65f4c9fb9681e4292c224a14 (diff) | |
download | mariadb-git-5fe9f0f7dde0ba59333a80d96ab3a665171b04a1.tar.gz |
Merge polly.(none):/home/kaa/src/maint/bug30453/my50-bug28878
into polly.(none):/home/kaa/src/maint/bug30453/my51-bug28878
Diffstat (limited to 'strings')
-rw-r--r-- | strings/ctype-simple.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/strings/ctype-simple.c b/strings/ctype-simple.c index 6b71f29f0d2..b5e5e2184ba 100644 --- a/strings/ctype-simple.c +++ b/strings/ctype-simple.c @@ -1561,14 +1561,18 @@ my_strntoull10rnd_8bit(CHARSET_INFO *cs __attribute__((unused)), } else addon= (*str >= '5'); - for ( ; str < end && (ch= (uchar) (*str - '0')) < 10; str++) + if (!dot) { - if (!dot) - shift++; + for ( ; str < end && (ch= (uchar) (*str - '0')) < 10; shift++, str++); + if (str < end && *str == '.') + { + str++; + for ( ; str < end && (ch= (uchar) (*str - '0')) < 10; str++); + } } - if (str < end && *str == '.' && !dot) + else { - str++; + shift= dot - str; for ( ; str < end && (ch= (uchar) (*str - '0')) < 10; str++); } goto exp; |