From 3b28549885af4740d128d6a9658a530197babbd8 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Thu, 29 Sep 2022 04:39:31 -0500 Subject: [PATCH] SNES: pre-dev118 gain hotfix --- src/engine/instrument.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/engine/instrument.cpp b/src/engine/instrument.cpp index a78bb8ffe..020edb965 100644 --- a/src/engine/instrument.cpp +++ b/src/engine/instrument.cpp @@ -1258,8 +1258,14 @@ DivDataErrors DivInstrument::readInsData(SafeReader& reader, short version) { // SNES if (version>=109) { snes.useEnv=reader.readC(); - snes.gainMode=(DivInstrumentSNES::GainMode)reader.readC(); - snes.gain=reader.readC(); + if (version<118) { + // why why why + reader.readC(); + reader.readC(); + } else { + snes.gainMode=(DivInstrumentSNES::GainMode)reader.readC(); + snes.gain=reader.readC(); + } snes.a=reader.readC(); snes.d=reader.readC(); snes.s=reader.readC();