patch-src_battle_bullets_c 593 B

1234567891011121314151617181920
  1. $OpenBSD: patch-src_battle_bullets_c,v 1.1 2015/12/14 10:12:52 bentley Exp $
  2. Fix occasional crash when starting levels.
  3. From upstream 25f2204d06f700fc83811fe4961de6938055402b.
  4. --- src/battle/bullets.c.orig Sun Dec 6 02:38:56 2015
  5. +++ src/battle/bullets.c Mon Dec 14 00:24:30 2015
  6. @@ -27,6 +27,13 @@ static Bullet bulletDef[BT_MAX];
  7. static Bullet *bulletsToDraw[MAX_BULLETS_TO_DRAW];
  8. static int incomingMissile;
  9. +void initBullets(void)
  10. +{
  11. + incomingMissile = 0;
  12. +
  13. + memset(bulletsToDraw, 0, sizeof(Bullet*) * MAX_BULLETS_TO_DRAW);
  14. +}
  15. +
  16. void initBulletDefs(void)
  17. {
  18. cJSON *root, *node;