summaryrefslogtreecommitdiffhomepage
path: root/src/enum.c
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2018-11-15 20:58:36 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2018-11-15 21:01:56 +0900
commitf39f428ed4cce826e3cc1e59a323369a2932ed75 (patch)
tree303fc6672d8b14b846e9b2b917816c7e4230d281 /src/enum.c
parent61f49690e43cea3df6ebbdf424cf6777826056b0 (diff)
downloadmruby-f39f428ed4cce826e3cc1e59a323369a2932ed75.tar.gz
mruby-f39f428ed4cce826e3cc1e59a323369a2932ed75.zip
Silence `-fsanitize=undefined` warning in `src/enum.c`; fix #4161
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 03508953e..38f004f51 100644
--- a/src/enum.c
+++ b/src/enum.c
@@ -30,7 +30,7 @@ enum_update_hash(mrb_state *mrb, mrb_value self)
/* not reached */
hv = 0;
}
- hash ^= (hv << (index % 16));
+ hash ^= ((uint32_t)hv << (index % 16));
return mrb_fixnum_value(hash);
}