From 6b2337740ecdce2bcc7053568c5b232845be75ff Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Thu, 24 Jul 2008 22:12:48 +0000 Subject: Make sure _musicVolume and _sfxVolume are clipped to fit in a byte. svn-id: r33266 --- engines/kyra/sound.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/kyra') diff --git a/engines/kyra/sound.cpp b/engines/kyra/sound.cpp index 5068268d99..c8749dc06b 100644 --- a/engines/kyra/sound.cpp +++ b/engines/kyra/sound.cpp @@ -202,8 +202,8 @@ bool SoundMidiPC::init() { } void SoundMidiPC::updateVolumeSettings() { - _musicVolume = ConfMan.getInt("music_volume"); - _sfxVolume = ConfMan.getInt("sfx_volume"); + _musicVolume = CLIP(ConfMan.getInt("music_volume"), 0, 255); + _sfxVolume = CLIP(ConfMan.getInt("sfx_volume"), 0, 255); updateChannelVolume(_musicVolume); } -- cgit v1.2.3