]> www.dolda2000.com Git - kaka/rust-sdl-test.git/commitdiff
Bugfix
authorTomas Wenström <tomas.wenstrom@gmail.com>
Sat, 2 Jan 2021 18:36:46 +0000 (19:36 +0100)
committerTomas Wenström <tomas.wenstrom@gmail.com>
Sat, 2 Jan 2021 18:36:46 +0000 (19:36 +0100)
0..<any negative number> is the same as 0..0

src/game/app.rs

index 438f2e7d1a2c26a4c0e67ca3c1cc119680289adc..e1fafdc1cdbf37ae70727a260e0ffcd1dac58db8 100644 (file)
@@ -83,7 +83,7 @@ impl ActiveState {
                 self.add_boll();
             }
         } else if delta < 0 {
-            for _i in 0..delta {
+            for _i in 0..(-delta) {
                 self.bolls.pop();
             }
         }