Avoid possible data loss by using `ptrdiff_t`.

parent ae040050
......@@ -26,9 +26,9 @@ typedef void (*each_backtrace_func)(mrb_state*, int i, struct backtrace_location
static const mrb_data_type bt_type = { "Backtrace", mrb_free };
static void
each_backtrace(mrb_state *mrb, mrb_int ciidx, mrb_code *pc0, each_backtrace_func func, void *data)
each_backtrace(mrb_state *mrb, ptrdiff_t ciidx, mrb_code *pc0, each_backtrace_func func, void *data)
{
int i, j;
ptrdiff_t i, j;
if (ciidx >= mrb->c->ciend - mrb->c->cibase)
ciidx = 10; /* ciidx is broken... */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment