diff --git a/src/sound.cpp b/src/sound.cpp --- a/src/sound.cpp +++ b/src/sound.cpp @@ -211,7 +211,7 @@ static void SndPlayScreenCoordFx(SoundFx StartSound( sound, - left / (vp->virtual_width / ((PANNING_LEVELS << 1) + 1)) - PANNING_LEVELS, + left / max(1, vp->virtual_width / ((PANNING_LEVELS << 1) + 1)) - PANNING_LEVELS, (GetSound(sound)->volume * msf.effect_vol * _vol_factor_by_zoom[vp->zoom]) >> 15 ); return;