mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
remove calling sprintf(); ref #1210
This commit is contained in:
+5
-1
@@ -2348,8 +2348,12 @@ mrb_str_dump(mrb_state *mrb, mrb_value str)
|
||||
*q++ = c;
|
||||
}
|
||||
else {
|
||||
int oct = c & 0xff;
|
||||
|
||||
*q++ = '\\';
|
||||
sprintf(q, "%03o", c&0xff);
|
||||
q[2] = '0' + oct % 8; oct /= 8;
|
||||
q[1] = '0' + oct % 8; oct /= 8;
|
||||
q[0] = '0' + oct % 8;
|
||||
q += 3;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user