Silence -fsanitize=undefined warning in src/enum.c; fix #4161

This commit is contained in:
Yukihiro "Matz" Matsumoto
2018-11-15 20:58:36 +09:00
parent 61f49690e4
commit f39f428ed4
+1 -1
View File
@@ -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);
}