sizeof("a") is bigger by one than strlen("a")

This commit is contained in:
Yukihiro Matsumoto
2012-06-27 15:19:40 +09:00
parent 6f9ed1c5b2
commit 0a88499f32
3 changed files with 10 additions and 10 deletions
+1 -1
View File
@@ -2988,7 +2988,7 @@ mrb_str_inspect(mrb_state *mrb, mrb_value str)
continue;
}
}
mrb_str_buf_cat(mrb, result, "\"", sizeof("\""));
mrb_str_buf_cat(mrb, result, "\"", 1);
return result;
}