summaryrefslogtreecommitdiff
path: root/sprintf.c
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-22 02:53:31 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-22 02:53:31 +0000
commitd9e196fd3da5d46e3a064cb6c93262d56e7bc048 (patch)
tree7639e5bea5709d14be1fc615c36082e596f19e6a /sprintf.c
parent215f80a9a021d40f63de1b811d81f48fd5424d42 (diff)
* sprintf.c (rb_f_sprintf): should not check positional number as
width. [ruby-core:11838] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@13210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sprintf.c')
-rw-r--r--sprintf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sprintf.c b/sprintf.c
index 76093faba7..de997098ba 100644
--- a/sprintf.c
+++ b/sprintf.c
@@ -342,7 +342,6 @@ rb_f_sprintf(argc, argv)
case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8': case '9':
- CHECK_FOR_WIDTH(flags);
n = 0;
GETNUM(n, width);
if (*p == '$') {
@@ -353,6 +352,7 @@ rb_f_sprintf(argc, argv)
p++;
goto retry;
}
+ CHECK_FOR_WIDTH(flags);
width = n;
flags |= FWIDTH;
goto retry;