From e8c70a9f63eb0b8995b4ae0985ce577a01fb55e1 Mon Sep 17 00:00:00 2001 From: atermonera Date: Fri, 10 Apr 2020 16:13:37 -0700 Subject: [PATCH] PRIORITY CRITICAL: Fix infinite loop in carp_migration.dm, line 44 --- code/modules/events/carp_migration.dm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/code/modules/events/carp_migration.dm b/code/modules/events/carp_migration.dm index e0b5fa8d6b..fef6445c77 100644 --- a/code/modules/events/carp_migration.dm +++ b/code/modules/events/carp_migration.dm @@ -40,12 +40,10 @@ if(spawn_locations.len) // Okay we've got landmarks, lets use those! shuffle_inplace(spawn_locations) num_groups = min(num_groups, spawn_locations.len) - var/i = 1 - while (i <= num_groups) + for (var/i = 0, i <= num_groups, i++) var/group_size = rand(group_size_min, group_size_max) for (var/j = 0, j < group_size, j++) spawn_one_carp(spawn_locations[i]) - i++ return // Okay we did *not* have any landmarks, so lets do our best!