mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
define and use print format macros for mrb_int
For portability: %ld can't be used to print a 64-bit mrb_int on WIN(32|64) because long is 32-bit wide.
This commit is contained in:
+1
-1
@@ -577,7 +577,7 @@ mrb_ary_set(mrb_state *mrb, mrb_value ary, mrb_int n, mrb_value val) /* rb_ary_s
|
||||
if (n < 0) {
|
||||
n += a->len;
|
||||
if (n < 0) {
|
||||
mrb_raisef(mrb, E_INDEX_ERROR, "index %ld out of array", n - a->len);
|
||||
mrb_raisef(mrb, E_INDEX_ERROR, "index %" PRIdMRB_INT " out of array", n - a->len);
|
||||
}
|
||||
}
|
||||
if (a->len <= (int)n) {
|
||||
|
||||
Reference in New Issue
Block a user