mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* util.c (ruby_strtod): stop at dot not followed by digits.
fixed: [ruby-dev:29035] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
99f9ac64a7
commit
3687809c6a
1 changed files with 2 additions and 2 deletions
4
util.c
4
util.c
|
@ -767,9 +767,9 @@ ruby_strtod(
|
|||
* and also locate the decimal point.
|
||||
*/
|
||||
|
||||
for ( ; c = *p; p++) {
|
||||
for ( ; (c = *p) != '\0'; p++) {
|
||||
if (!ISDIGIT(c)) {
|
||||
if (c != '.' || hasPoint) {
|
||||
if (c != '.' || hasPoint || !ISDIGIT(p[1])) {
|
||||
break;
|
||||
}
|
||||
hasPoint = Qtrue;
|
||||
|
|
Loading…
Reference in a new issue