Skip to content
Permalink
Browse files
Initialize flags for each loop.
  • Loading branch information
matz committed Jul 3, 2017
1 parent 9b8956c commit 31bc2b000935ffc3fa6d3bf1494079139fc9a1b4
Showing 1 changed file with 1 addition and 1 deletion.
@@ -528,7 +528,6 @@ mrb_str_format(mrb_state *mrb, int argc, const mrb_value *argv, mrb_value fmt)
mrb_int n;
mrb_int width;
mrb_int prec;
int flags = FNONE;
int nextarg = 1;
int posarg = 0;
mrb_value nextvalue;
@@ -564,6 +563,7 @@ mrb_str_format(mrb_state *mrb, int argc, const mrb_value *argv, mrb_value fmt)
for (; p < end; p++) {
const char *t;
mrb_sym id = 0;
int flags = FNONE;

for (t = p; t < end && *t != '%'; t++) ;
if (t + 1 == end) ++t;

0 comments on commit 31bc2b0

Please sign in to comment.