From 751523899763b7d5aa46c538c3e306d0c927485e Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Mon, 29 Aug 2016 00:16:37 -0700 Subject: [PATCH] GB Serialize: Fix copy/paste error in deserialization --- src/gb/audio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gb/audio.c b/src/gb/audio.c index d055d66e9..9b78d799f 100644 --- a/src/gb/audio.c +++ b/src/gb/audio.c @@ -924,7 +924,7 @@ void GBAudioPSGDeserialize(struct GBAudio* audio, const struct GBSerializedPSGSt LOAD_32LE(audio->nextFrame, 0, &state->ch1.nextFrame); LOAD_32LE(audio->nextCh1, 0, &state->ch1.nextEvent); - LOAD_32LE(ch2Flags, 0, &state->ch1.envelope); + LOAD_32LE(ch2Flags, 0, &state->ch2.envelope); audio->ch2.envelope.currentVolume = GBSerializedAudioFlagsGetCh2Volume(flags); audio->ch2.envelope.dead = GBSerializedAudioFlagsGetCh2Dead(flags); audio->ch2.control.hi = GBSerializedAudioFlagsGetCh2Hi(flags); @@ -937,7 +937,7 @@ void GBAudioPSGDeserialize(struct GBAudio* audio, const struct GBSerializedPSGSt LOAD_16LE(audio->ch3.length, 0, &state->ch3.length); LOAD_32LE(audio->nextCh3, 0, &state->ch3.nextEvent); - LOAD_32LE(ch4Flags, 0, &state->ch1.envelope); + LOAD_32LE(ch4Flags, 0, &state->ch4.envelope); audio->ch4.envelope.currentVolume = GBSerializedAudioFlagsGetCh4Volume(flags); audio->ch4.envelope.dead = GBSerializedAudioFlagsGetCh4Dead(flags); audio->ch4.length = GBSerializedAudioEnvelopeGetLength(ch4Flags);