Fixed issue #8

This commit is contained in:
Iliyas Jorio 2014-08-21 14:33:16 +02:00
parent c43a373537
commit 12b7327ff2

View File

@ -894,7 +894,7 @@ function sfxr.Sound:exportWAV(f, freq, bits)
if bits == sfxr.BITS_16 then if bits == sfxr.BITS_16 then
-- wrap around a bit -- wrap around a bit
if v >= 256^2 then v = 0 end if v >= 256^2 then v = 0 end
if v < 0 then v = 256^2 - 1 end if v < 0 then v = 256^2 + v end
w16(v) w16(v)
else else
f:write(string.char(v)) f:write(string.char(v))