mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2024-12-27 03:31:49 +01:00
[Core/CD] fixed CD hardware buffer initialization when using dynamic memory allocation
This commit is contained in:
parent
f5c826731d
commit
f5e425b92a
@ -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
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user