summaryrefslogtreecommitdiffhomepage
path: root/src/enum.c
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2020-08-27 09:42:26 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2020-10-12 18:20:05 +0900
commit5134031e189e1cdde198e1c09f7b1d22bf2a1ce0 (patch)
treec6f9ad2f670c7aa50690f073a6e756f568cbcf00 /src/enum.c
parentbefcbd5607a060e5e619cae7333512c8bdde32f6 (diff)
downloadmruby-5134031e189e1cdde198e1c09f7b1d22bf2a1ce0.tar.gz
mruby-5134031e189e1cdde198e1c09f7b1d22bf2a1ce0.zip
Use `mrb_int_value()` instead of `mrb_fixnum_value()`.
Where fixnum overflow can happen.
Diffstat (limited to 'src/enum.c')
-rw-r--r--src/enum.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/enum.c b/src/enum.c
index d31370188..b95956715 100644
--- a/src/enum.c
+++ b/src/enum.c
@@ -18,7 +18,7 @@ enum_update_hash(mrb_state *mrb, mrb_value self)
mrb_get_args(mrb, "iii", &hash, &index, &hv);
hash ^= ((uint32_t)hv << (index % 16));
- return mrb_fixnum_value(hash);
+ return mrb_int_value(mrb, hash);
}
void