Remove sprintf().

This commit is contained in:
Masaki Muranaka
2013-04-25 15:36:19 +09:00
parent 433cb13e6d
commit 6684b7d1cf
+5 -2
View File
@@ -2438,8 +2438,11 @@ mrb_str_inspect(mrb_state *mrb, mrb_value str)
continue;
}
else {
int n = sprintf(buf, "\\%03o", c & 0377);
mrb_str_buf_cat(mrb, result, buf, n);
buf[0] = '\\';
buf[3] = '0' + c % 8; c /= 8;
buf[2] = '0' + c % 8; c /= 8;
buf[1] = '0' + c % 8;
mrb_str_buf_cat(mrb, result, buf, 4);
continue;
}
}