habit puzzle game don't crash with 0 points

This commit is contained in:
2022-06-06 15:53:47 +00:00
parent e8d7982624
commit 2c7a26a792

View File

@@ -26,6 +26,7 @@
&mut i 0
&mut currentRewardFile null]
// Find, load, and add the current reward image as big as possible:
(set currentRewardFile (nth m.rewardFiles 0))
(while (> p .startingPoints (nth m.rewardFiles i))
(set currentRewardFile (nth m.rewardFiles i))
(if (>= ++i m.rewardFiles.length)