summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/sound.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sound.cpp b/src/sound.cpp
index ac8f3c2fa..249ff73e3 100644
--- a/src/sound.cpp
+++ b/src/sound.cpp
@@ -211,7 +211,7 @@ static void SndPlayScreenCoordFx(SoundFx sound, int x, int y)
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;