mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
use return value from sprintf/snprintf
This commit is contained in:
+2
-2
@@ -2983,8 +2983,8 @@ mrb_str_inspect(mrb_state *mrb, mrb_value str)
|
||||
continue;
|
||||
}
|
||||
else {
|
||||
sprintf(buf, "\\%03o", c & 0377);
|
||||
mrb_str_buf_cat(mrb, result, buf, strlen(buf));
|
||||
int n = sprintf(buf, "\\%03o", c & 0377);
|
||||
mrb_str_buf_cat(mrb, result, buf, n);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user