File bomberclone-0.11.7_array-subscript.patch of Package bomberclone

--- src/player.c
+++ src/player.c
@@ -873,16 +873,16 @@
         if (nr < 0 || nr >= MAX_BOMBS) // i out of range .. restart at bomb 0
             nr -= MAX_BOMBS;
 
-        if (player->bombs[i].state == BS_off) { /* check if this bomb is free */
+        if (player->bombs[nr].state == BS_off) { /* check if this bomb is free */
             if (res == -1)
-                res = i;
+                res = nr;
         }
         else
             bombused++;         // count number of used bombs
     }
 
-    if (res == -1 && i == player->bomb_lastex && player->bombs[i].state == BS_off)
-        res = i;
+    if (res == -1 && nr == player->bomb_lastex && player->bombs[nr].state == BS_off)
+        res = nr;
 
     if (bombused >= player->bombs_n)
         res = -1;               /* all max number of bombs lay */