mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Bug fix: '-' should not be counted as a digit(to_s(n) format).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
923044bba2
commit
b2385db896
1 changed files with 2 additions and 4 deletions
|
@ -3109,10 +3109,8 @@ VpFormatSt(char *psz,S_INT fFmt)
|
|||
for(i = 0; i < ie; ++i) {
|
||||
ch = psz[i];
|
||||
if(!ch) break;
|
||||
if(ch == '.') {
|
||||
nf = 0;
|
||||
continue;
|
||||
}
|
||||
if(ch=='-' || ch=='+') continue;
|
||||
if(ch == '.') { nf = 0;continue;}
|
||||
if(ch == 'E') break;
|
||||
nf++;
|
||||
if(nf > fFmt) {
|
||||
|
|
Loading…
Reference in a new issue