diff --git a/audio/softsynth/fmtowns_pc98/towns_pc98_fmsynth.cpp b/audio/softsynth/fmtowns_pc98/towns_pc98_fmsynth.cpp index 8164a78125e..14f7287ddc6 100644 --- a/audio/softsynth/fmtowns_pc98/towns_pc98_fmsynth.cpp +++ b/audio/softsynth/fmtowns_pc98/towns_pc98_fmsynth.cpp @@ -967,8 +967,7 @@ TownsPC98_FmSynth::TownsPC98_FmSynth(Audio::Mixer *mixer, EmuType type) : memset(&_timers[0], 0, sizeof(ChipTimer)); memset(&_timers[1], 0, sizeof(ChipTimer)); - memset(_registers[0], 0, 255); - memset(_registers[1], 0, 255); + memset(_registers, 0, sizeof(_registers)); _timerProcIdle = new ChipTimerProc(this, &TownsPC98_FmSynth::idleTimerCallback); _timerProcA = new ChipTimerProc(this, &TownsPC98_FmSynth::timerCallbackA); @@ -1056,8 +1055,7 @@ void TownsPC98_FmSynth::reset() { _chanInternal[i].updateEnvelopeParameters = false; } - memset(_registers[0], 0, 255); - memset(_registers[1], 0, 255); + memset(_registers, 0, sizeof(_registers)); #ifdef ENABLE_SNDTOWNS98_WAITCYCLES _waitCycleElapsedWrites.clear();