Commit 9c831c9a authored by Masaki Muranaka's avatar Masaki Muranaka

Remove the escape backslash from the result string.

parent e265d7c7
......@@ -249,8 +249,15 @@ mrb_vformat(mrb_state *mrb, const char *format, va_list ap)
}
}
else if (c == '\\') {
if (!*p) break;
p++;
if (*p) {
size = p - b - 1;
mrb_ary_push(mrb, ary, mrb_str_new(mrb, b, size));
mrb_ary_push(mrb, ary, mrb_str_new(mrb, p, 1));
b = ++p;
}
else {
break;
}
}
p++;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment