diff options
author | unknown <kaa@polly.(none)> | 2007-10-23 13:31:24 +0400 |
---|---|---|
committer | unknown <kaa@polly.(none)> | 2007-10-23 13:31:24 +0400 |
commit | fb7797247028c8fa4e3435cc16ec7ee657d7e2fe (patch) | |
tree | 7780f17bdabb29ab3c92fa7ee9e9f16bed0b380e /strings | |
parent | 966e3df37474b892c23c2516467768393adb7f32 (diff) | |
parent | 4eec3b087de468382f6c4e9eb2397cacfc18821f (diff) | |
download | mariadb-git-fb7797247028c8fa4e3435cc16ec7ee657d7e2fe.tar.gz |
Merge polly.(none):/home/kaa/src/maint/bug30453/my50-bug28878
into polly.(none):/home/kaa/src/maint/mysql-5.0-maint
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 8b1b0d6790d..e073262cd4c 100644 --- a/strings/ctype-simple.c +++ b/strings/ctype-simple.c @@ -1538,14 +1538,18 @@ my_strntoull10rnd_8bit(CHARSET_INFO *cs __attribute__((unused)), } else addon= (*str >= '5'); - for ( ; str < end && (ch= (unsigned char) (*str - '0')) < 10; str++) + if (!dot) { - if (!dot) - shift++; + for ( ; str < end && (ch= (unsigned char) (*str - '0')) < 10; shift++, str++); + if (str < end && *str == '.') + { + str++; + for ( ; str < end && (ch= (unsigned char) (*str - '0')) < 10; str++); + } } - if (str < end && *str == '.' && !dot) + else { - str++; + shift= dot - str; for ( ; str < end && (ch= (unsigned char) (*str - '0')) < 10; str++); } goto exp; |