From e6e552d999df4f93da3adb71eaaa3aa032561a91 Mon Sep 17 00:00:00 2001 From: Isaiah Mann Date: Thu, 22 Jun 2017 14:51:24 -0400 Subject: [PATCH] Fixed array out of bounds error if all dogs are adopted --- Assets/Scripts/Data/PickupPup/DogDatabase.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/Scripts/Data/PickupPup/DogDatabase.cs b/Assets/Scripts/Data/PickupPup/DogDatabase.cs index b8c30952..d30bd975 100644 --- a/Assets/Scripts/Data/PickupPup/DogDatabase.cs +++ b/Assets/Scripts/Data/PickupPup/DogDatabase.cs @@ -163,7 +163,7 @@ public DogDescriptor[] GetInOrderDogList( { do { - if(indexInMasterDogArr < maxMasterIndex) + if(indexInMasterDogArr < maxMasterIndex && indexInMasterDogArr < this.dogs.Length) { dogList[i] = this.dogs[indexInMasterDogArr]; }