Mercurial > repos > blastem
diff m68k_core.c @ 2346:0111c8344477
Fix some issues identified by asan/ubsan
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sat, 07 Oct 2023 18:04:35 -0700 |
parents | 31fc1186ffbb |
children | f8b5142c06aa |
line wrap: on
line diff
--- a/m68k_core.c Fri Oct 06 00:20:37 2023 -0700 +++ b/m68k_core.c Sat Oct 07 18:04:35 2023 -0700 @@ -1221,8 +1221,8 @@ context->aregs[8] = context->aregs[7]; } context->status = 0x27; - context->aregs[7] = reset_vec[0] << 16 | reset_vec[1]; - uint32_t address = reset_vec[2] << 16 | reset_vec[3]; + context->aregs[7] = ((uint32_t)reset_vec[0]) << 16 | reset_vec[1]; + uint32_t address = ((uint32_t)reset_vec[2]) << 16 | reset_vec[3]; //interrupt mask may have changed so force a sync context->options->sync_components(context, address); start_68k_context(context, address);