diff --git a/core/loadrom.c b/core/loadrom.c index 0e1d4b5..c9e3b0d 100644 --- a/core/loadrom.c +++ b/core/loadrom.c @@ -3,7 +3,7 @@ * ROM Loading Support * * Copyright (C) 1998-2003 Charles Mac Donald (original code) - * Copyright (C) 2007-2016 Eke-Eke (Genesis Plus GX) + * Copyright (C) 2007-2017 Eke-Eke (Genesis Plus GX) * * Redistribution and use of this code or any derivative works are permitted * provided that the following conditions are met: @@ -534,8 +534,8 @@ int load_rom(char *filename) #ifdef USE_DYNAMIC_ALLOC if (!ext) { - /* allocate memory for Cartridge / CD hardware if required */ - ext = (external_t *)malloc(sizeof(external_t)); + /* allocate & initialize memory for Cartridge / CD hardware if required */ + ext = (external_t *)calloc(1, sizeof(external_t)); if (!ext) return (0); } #endif diff --git a/core/loadrom.h b/core/loadrom.h index 8807034..5809a76 100644 --- a/core/loadrom.h +++ b/core/loadrom.h @@ -3,7 +3,7 @@ * ROM Loading Support * * Copyright (C) 1998-2003 Charles Mac Donald (original code) - * Copyright (C) 2007-2016 Eke-Eke (Genesis Plus GX) + * Copyright (C) 2007-2017 Eke-Eke (Genesis Plus GX) * * Redistribution and use of this code or any derivative works are permitted * provided that the following conditions are met: