From 91f233c5fb1296bdce6e5da3fb736f2218677f8c Mon Sep 17 00:00:00 2001 From: kervala Date: Mon, 17 May 2010 11:22:16 +0200 Subject: [PATCH] Fixed: #908 Incorrect method CMusicPlayer::previous() (patch provided by lubos) --- code/ryzom/client/src/interface_v3/music_player.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/code/ryzom/client/src/interface_v3/music_player.cpp b/code/ryzom/client/src/interface_v3/music_player.cpp index edef6a784..029decf1c 100644 --- a/code/ryzom/client/src/interface_v3/music_player.cpp +++ b/code/ryzom/client/src/interface_v3/music_player.cpp @@ -108,8 +108,11 @@ void CMusicPlayer::previous () if (!_Songs.empty()) { // Point the previous song - _CurrentSong--; - _CurrentSong%=_Songs.size(); + if (_CurrentSong == 0) + _CurrentSong = _Songs.size()-1; + else + _CurrentSong--; + play (); } }