From b49c3f229dc8827f175cec647c863eb83ae8a457 Mon Sep 17 00:00:00 2001 From: Tyler Camp Date: Sat, 20 Apr 2024 12:47:09 -0400 Subject: [PATCH] Fix stack overflow --- PalCalc.UI/Model/TraitIcon.cs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/PalCalc.UI/Model/TraitIcon.cs b/PalCalc.UI/Model/TraitIcon.cs index 26306d99..fc5df714 100644 --- a/PalCalc.UI/Model/TraitIcon.cs +++ b/PalCalc.UI/Model/TraitIcon.cs @@ -29,15 +29,17 @@ ImageSource IconImage(string iconName) return source; } - Images.Add(-3, IconImage("Passive_Negative_3_icon.png")); - Images.Add(-2, IconImage("Passive_Negative_2_icon.png")); - Images.Add(-1, IconImage("Passive_Negative_1_icon.png")); + images = new Dictionary(); - Images.Add(0, IconImage("Passive_Positive_1_icon.png")); + images.Add(-3, IconImage("Passive_Negative_3_icon.png")); + images.Add(-2, IconImage("Passive_Negative_2_icon.png")); + images.Add(-1, IconImage("Passive_Negative_1_icon.png")); - Images.Add(1, IconImage("Passive_Positive_1_icon.png")); - Images.Add(2, IconImage("Passive_Positive_2_icon.png")); - Images.Add(3, IconImage("Passive_Positive_3_icon.png")); + images.Add(0, IconImage("Passive_Positive_1_icon.png")); + + images.Add(1, IconImage("Passive_Positive_1_icon.png")); + images.Add(2, IconImage("Passive_Positive_2_icon.png")); + images.Add(3, IconImage("Passive_Positive_3_icon.png")); } return images;