Skip to content

Commit

Permalink
Fix exception when reading holy sites (#1709) #patch
Browse files Browse the repository at this point in the history
  • Loading branch information
IhateTrains authored Jan 15, 2024
1 parent 4d61a13 commit 99190a2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ImperatorToCK3/CK3/Religions/HolySite.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ public HolySite(string id, BufferedReader holySiteReader, Title.LandedTitles lan
parser.RegisterKeyword("barony", reader => parsedBaronyId = reader.GetString());
parser.RegisterKeyword("character_modifier", reader => {
CharacterModifier = reader.GetAssignments()
.ToDictionary(kvp => kvp.Key, kvp => (object)kvp.Value);
.GroupBy(a => a.Key)
.ToDictionary(g => g.Key, g => (object)g.Last().Value);
});
parser.RegisterKeyword("flag", reader => Flag = reader.GetString());
parser.IgnoreAndLogUnregisteredItems();
Expand Down

0 comments on commit 99190a2

Please sign in to comment.