summaryrefslogtreecommitdiff
path: root/sprintf.c
diff options
context:
space:
mode:
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;