diff options
Diffstat (limited to 'src/string.c')
| -rw-r--r-- | src/string.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/string.c b/src/string.c index c74dcedde..f01c08bce 100644 --- a/src/string.c +++ b/src/string.c @@ -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; } } |
