io_read: use %i instead of %d in call to mrb_raisef

`length` is `mrb_int`, not `int`.
This commit is contained in:
ArtSin
2024-11-04 13:56:46 +04:00
parent 48455756d2
commit 0afc7ae13b
+1 -1
View File
@@ -1679,7 +1679,7 @@ io_read(mrb_state *mrb, mrb_value io)
else {
length = mrb_as_int(mrb, len);
if (length < 0) {
mrb_raisef(mrb, E_ARGUMENT_ERROR, "negative length %d given", length);
mrb_raisef(mrb, E_ARGUMENT_ERROR, "negative length %i given", length);
}
if (length == 0) {
return io_reset_outbuf(mrb, outbuf, 0);