[colobot] 302/390: Fixed program selection shortcuts

Didier Raboud odyx at moszumanska.debian.org
Fri Jun 12 14:21:57 UTC 2015


This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch upstream/latest
in repository colobot.

commit 30f7075f4ecfeb65ec8cc8ca469ad91bf68ff363
Author: krzys-h <krzys_h at interia.pl>
Date:   Sun Mar 29 14:31:43 2015 +0200

    Fixed program selection shortcuts
---
 src/object/brain.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/object/brain.cpp b/src/object/brain.cpp
index f4227e1..94a4178 100644
--- a/src/object/brain.cpp
+++ b/src/object/brain.cpp
@@ -278,8 +278,8 @@ bool CBrain::EventProcess(const Event &event)
                 index = event.key.key-KEY(1);
             else if(event.key.key == KEY(0))
                 index = 9;
-            if(index < 0) index = 9;
-            if(index > 9) index = 0;
+            if(index < 0) index = m_program.size()-1;
+            if(index > static_cast<int>(m_program.size())-1) index = 0;
 
             if(GetSelScript() != index)
             {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/colobot.git



More information about the Pkg-games-commits mailing list