Commit cf8b6ec8 authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto

Merge pull request #326 from masamitsu-murase/modify_str_format_len

Fix str_format_len.
parents e32ab50e 0b4d9674
......@@ -45,7 +45,7 @@ str_format_len(mrb_value str)
char *src;
for (src = RSTRING_PTR(str); src < RSTRING_END(str);) {
for (src = RSTRING_PTR(str); src < RSTRING_END(str); src++) {
switch (*src) {
case 0x07:/* BEL */ /* fall through */
case 0x08:/* BS */ /* fall through */
......@@ -58,11 +58,11 @@ str_format_len(mrb_value str)
case 0x27:/* ' */ /* fall through */
case 0x3F:/* ? */ /* fall through */
case 0x5C:/* \ */ /* fall through */
dump_len += 2; src += 2;
dump_len += 2;
break;
default:
dump_len++; src++;
dump_len++;
break;
}
}
......
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