Mercurial > repos > blastem
diff m68k_core.c @ 1787:0c6d07f91346 mame_interp
Merge from default
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Thu, 14 Mar 2019 23:40:50 -0700 |
parents | 30b5952fd32e eda8df5bc74c |
children | 374a5ae694e8 |
line wrap: on
line diff
--- a/m68k_core.c Wed Mar 13 22:01:22 2019 -0700 +++ b/m68k_core.c Thu Mar 14 23:40:50 2019 -0700 @@ -1274,9 +1274,7 @@ m68k_context * init_68k_context(m68k_options * opts, m68k_reset_handler reset_handler) { #ifdef USE_NATIVE - size_t ctx_size = sizeof(m68k_context) + ram_size(&opts->gen) / (1 << opts->gen.ram_flags_shift) / 8; - m68k_context * context = malloc(ctx_size); - memset(context, 0, ctx_size); + m68k_context * context = calloc(1, sizeof(m68k_context) + ram_size(&opts->gen) / (1 << opts->gen.ram_flags_shift) / 8); context->options = opts; #else m68000_base_device *device = malloc(sizeof(m68000_base_device));;