diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2018-11-15 20:58:36 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2018-11-15 21:01:56 +0900 |
| commit | f39f428ed4cce826e3cc1e59a323369a2932ed75 (patch) | |
| tree | 303fc6672d8b14b846e9b2b917816c7e4230d281 /src/enum.c | |
| parent | 61f49690e43cea3df6ebbdf424cf6777826056b0 (diff) | |
| download | mruby-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.c | 2 |
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); } |
