mirror of https://github.com/stella-emu/stella.git
Don't create an array of size 0.
This commit is contained in:
parent
2770845f6b
commit
2ae04d7450
|
@ -52,6 +52,7 @@ void CartridgeEnhanced::install(System& system)
|
||||||
myCurrentSegOffset = make_unique<uInt32[]>(myBankSegs);
|
myCurrentSegOffset = make_unique<uInt32[]>(myBankSegs);
|
||||||
|
|
||||||
// Allocate array for the RAM area
|
// Allocate array for the RAM area
|
||||||
|
if(myRamSize > 0)
|
||||||
myRAM = make_unique<uInt8[]>(myRamSize);
|
myRAM = make_unique<uInt8[]>(myRamSize);
|
||||||
|
|
||||||
mySystem = &system;
|
mySystem = &system;
|
||||||
|
@ -101,6 +102,7 @@ void CartridgeEnhanced::install(System& system)
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
void CartridgeEnhanced::reset()
|
void CartridgeEnhanced::reset()
|
||||||
{
|
{
|
||||||
|
if(myRamSize > 0)
|
||||||
initializeRAM(myRAM.get(), myRamSize);
|
initializeRAM(myRAM.get(), myRamSize);
|
||||||
|
|
||||||
initializeStartBank(getStartBank());
|
initializeStartBank(getStartBank());
|
||||||
|
|
Loading…
Reference in New Issue