diff options
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r-- | vm_insnhelper.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c index 2c43e06f63..c9ec803630 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -498,7 +498,7 @@ vm_getivar(VALUE obj, ID id, IC ic, rb_call_info_t *ci, int is_attr) if (LIKELY((!is_attr && ic->ic_serial == RCLASS_SERIAL(klass)) || (is_attr && ci->aux.index > 0))) { - long index = !is_attr ? (long)ic->ic_value.index : ci->aux.index - 1; + int index = !is_attr ? (int)ic->ic_value.index : ci->aux.index - 1; long len = ROBJECT_NUMIV(obj); VALUE *ptr = ROBJECT_IVPTR(obj); @@ -522,7 +522,7 @@ vm_getivar(VALUE obj, ID id, IC ic, rb_call_info_t *ci, int is_attr) ic->ic_serial = RCLASS_SERIAL(klass); } else { /* call_info */ - ci->aux.index = index + 1; + ci->aux.index = (int)index + 1; } } } |