diff options
author | Nebuleon Fumika | 2013-02-08 15:46:33 -0500 |
---|---|---|
committer | Nebuleon Fumika | 2013-02-08 15:46:33 -0500 |
commit | 3834297fae931341c40bb293efb2f10cf7549d26 (patch) | |
tree | fdc78fdbc59b54305b4cb70733a44472adb33c26 /source | |
parent | 0a2041d1ce3a5ce62df279371ce6857bb8b11205 (diff) | |
download | snes9x2005-3834297fae931341c40bb293efb2f10cf7549d26.tar.gz snes9x2005-3834297fae931341c40bb293efb2f10cf7549d26.tar.bz2 snes9x2005-3834297fae931341c40bb293efb2f10cf7549d26.zip |
Fix write to uninitialised memory in 8-bit sound.
Diffstat (limited to 'source')
-rw-r--r-- | source/soundux.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/soundux.cpp b/source/soundux.cpp index b8df25a..399b04b 100644 --- a/source/soundux.cpp +++ b/source/soundux.cpp @@ -842,7 +842,7 @@ void DecodeBlock (Channel *ch) ch->loop = (filter & 2) != 0; int16 interim[16]; - uint8 interim_byte; + uint8 interim_byte = 0; compressed++; signed short *raw = ch->block = ch->decoded; @@ -974,7 +974,7 @@ void DecodeBlock (Channel *ch) for (i = 0; i < 8; i++) ch->decoded[i] = amplitude / 2; for (i = 8; i < 16; i++) - ch->decoded[i] = -amplitude / 2; + ch->decoded[i] = -(amplitude / 2); } } else |