stage: check for radius<=0 in stage_clear_hazards_at

This commit is contained in:
Andrei Alexeyev 2024-05-08 16:11:44 +02:00
parent 071d1163fd
commit fcc068f0e5
No known key found for this signature in database
GPG key ID: 72D26128040B9690

View file

@ -736,6 +736,11 @@ static bool ellipse_predicate(EntityInterface *ent, void *varg) {
void stage_clear_hazards_at(cmplx origin, double radius, ClearHazardsFlags flags) {
Circle area = { origin, radius };
if(UNLIKELY(radius <= 0)) {
return;
}
stage_clear_hazards_predicate(proximity_predicate, &area, flags);
}