From 48d9219a96096cf44df8ac24413b36d1b718b1d5 Mon Sep 17 00:00:00 2001 From: erik Date: Wed, 24 Jan 2007 19:57:51 +0000 Subject: Each file in this commit has the issue where a function can return a negative result but the result is used in a context that can only be positive. --- (limited to 'noncore/games') diff --git a/noncore/games/kpacman/score.cpp b/noncore/games/kpacman/score.cpp index 6878b81..737f03b 100644 --- a/noncore/games/kpacman/score.cpp +++ b/noncore/games/kpacman/score.cpp @@ -239,11 +239,11 @@ void Score::keyPressEvent(QKeyEvent *k) } if (x != cursor.x || y != cursor.y) { - if (cursor.x != -1) + if (cursor.x != -1 && lastScore >= 0) cursor.chr = hallOfFame[lastScore].name.at(cursor.x-14); scrollRepeat = FALSE; repaint(rect(x, y*1.25, cursor.chr), FALSE); - } else + } else if (lastScore >= 0) hallOfFame[lastScore].name.at(cursor.x-14) = cursor.chr; if (key == UpKey || key == Key_Up || key == DownKey || key == Key_Down) -- cgit v0.9.0.2