summaryrefslogtreecommitdiff
path: root/strings
diff options
context:
space:
mode:
authorunknown <kaa@polly.(none)>2007-10-23 13:39:31 +0400
committerunknown <kaa@polly.(none)>2007-10-23 13:39:31 +0400
commit7e91dbd3313ac4cbca9ab9e017addcedf41d7b87 (patch)
treea1e81fd81b0861dd598392b9323a4dbaab8ec6b0 /strings
parent3d54e7320c8791acd7406b26af96552b57a72ca0 (diff)
parent251b083ed767b5a58b34dafc6d8a3cf9c602841d (diff)
downloadmariadb-git-7e91dbd3313ac4cbca9ab9e017addcedf41d7b87.tar.gz
Merge polly.(none):/home/kaa/src/maint/bug30453/my51-bug28878
into polly.(none):/home/kaa/src/maint/mysql-5.1-maint
Diffstat (limited to 'strings')
-rw-r--r--strings/ctype-simple.c14
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;