diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-07-17 15:43:47 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-07-17 15:43:47 +0000 |
| commit | 82b7274cf640ba2ccb520e97d466262bcdfe7ee9 (patch) | |
| tree | dfff6e8892944555980d6ab66af4647ee980ad89 | |
| parent | f77119085cc54eb068169e7c6bd02c495e475e9b (diff) | |
| download | ruby-82b7274cf640ba2ccb520e97d466262bcdfe7ee9.tar.gz ruby-82b7274cf640ba2ccb520e97d466262bcdfe7ee9.tar.xz ruby-82b7274cf640ba2ccb520e97d466262bcdfe7ee9.zip | |
* util.c (ruby_strtod): stop at dot not followed by digits.
fixed: [ruby-dev:29035]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@10550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | util.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; |
