* util.c (ruby_strtod): ruby_strtod don't allow a trailing

decimal point like "7.". [ruby-dev:34835] [ruby-dev:35009]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
wanabe 2008-06-10 08:01:09 +00:00
parent 4fd154d05e
commit eff06d7ae6
2 changed files with 7 additions and 0 deletions

View File

@ -1,3 +1,8 @@
Tue Jun 10 16:00:29 2008 wanabe <s.wanabe@gmail.com>
* util.c (ruby_strtod): ruby_strtod don't allow a trailing
decimal point like "7.". [ruby-dev:34835] [ruby-dev:35009]
Tue Jun 10 13:48:38 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
* rational.c (nurat_s_convert): need not to initialize optional

2
util.c
View File

@ -2263,6 +2263,8 @@ break2:
}
#endif
if (c == '.') {
if (!ISDIGIT(s[1]))
goto dig_done;
c = *++s;
if (!nd) {
for (; c == '0'; c = *++s)