Skip to content

Commit

Permalink
Merge pull request #5471 from Goober5000/fix_5470
Browse files Browse the repository at this point in the history
fix Assertion in turret_swarm_set_up_info
  • Loading branch information
Goober5000 authored Jun 25, 2023
2 parents 4fa5c0d + 7f05f77 commit 1ddf247
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/weapon/swarm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ void turret_swarm_set_up_info(int parent_objnum, ship_subsys *turret, weapon_inf
parent_obj = &Objects[parent_objnum];
Assert(parent_obj->type == OBJ_SHIP);
shipp = &Ships[parent_obj->instance];
Assert((turret->turret_enemy_objnum >= 0) && (turret->turret_enemy_objnum < MAX_OBJECTS));
Assert(turret->turret_enemy_objnum < MAX_OBJECTS);
if((turret->turret_enemy_objnum < 0) || (turret->turret_enemy_objnum >= MAX_OBJECTS)){
return;
}
Expand Down

0 comments on commit 1ddf247

Please sign in to comment.