summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Ferrare <kevin@rockbox.org>2009-10-29 02:21:47 +0000
committerKevin Ferrare <kevin@rockbox.org>2009-10-29 02:21:47 +0000
commitc4079e0b12bcef176fc8eaaa6ef17b465e15b730 (patch)
treecf893f5bf68349a297f3627c5c7d7739983fe621
parentdb8d79db7ef946b3d531f3c2cfa55dfdc35c7793 (diff)
downloadrockbox-c4079e0b12bcef176fc8eaaa6ef17b465e15b730.tar.gz
rockbox-c4079e0b12bcef176fc8eaaa6ef17b465e15b730.zip
Fixed the Boomshine plugin not to crash when there are no more levels to play
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23392 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/plugins/boomshine.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/plugins/boomshine.lua b/apps/plugins/boomshine.lua
index 0067d28e95..9c8b5599fe 100644
--- a/apps/plugins/boomshine.lua
+++ b/apps/plugins/boomshine.lua
@@ -249,12 +249,15 @@ rb.backlight_force_on()
249local idx, highscore = 1, 0 249local idx, highscore = 1, 0
250while true do 250while true do
251 local level = levels[idx] 251 local level = levels[idx]
252 local goal, nrBalls = level[1], level[2] 252 local goal, nrBalls
253 253
254 if level == nil then 254 if level == nil then
255 break -- No more levels to play 255 break -- No more levels to play
256 end 256 end
257 257
258 goal = level[1]
259 nrBalls = level[2]
260
258 display_message(string.format("Level %d: get %d out of %d balls", idx, goal, nrBalls)) 261 display_message(string.format("Level %d: get %d out of %d balls", idx, goal, nrBalls))
259 262
260 local exit, score = start_round(idx, goal, nrBalls, highscore) 263 local exit, score = start_round(idx, goal, nrBalls, highscore)