From 9c8ca61dbe2b52c8e99ffe7a4a34f09b4b09daf6 Mon Sep 17 00:00:00 2001 From: iht Date: Wed, 8 Jan 2025 03:02:23 +0100 Subject: [PATCH] Fix more invalid liege entries being outputted --- ImperatorToCK3/CK3/Titles/LandedTitles.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ImperatorToCK3/CK3/Titles/LandedTitles.cs b/ImperatorToCK3/CK3/Titles/LandedTitles.cs index 7a79ade9e..851806678 100644 --- a/ImperatorToCK3/CK3/Titles/LandedTitles.cs +++ b/ImperatorToCK3/CK3/Titles/LandedTitles.cs @@ -325,7 +325,7 @@ public void CleanUpHistory(CharacterCollection characters, Date ck3BookmarkDate) // and move the liege entry to that date. liegeTitle.History.Fields.TryGetValue("holder", out var liegeHolderField); Date? laterDate = liegeHolderField?.DateToEntriesDict - .Where(kvp => kvp.Value.Count != 0 && kvp.Key > date && kvp.Key <= ck3BookmarkDate) + .Where(kvp => kvp.Key > date && kvp.Key <= ck3BookmarkDate && kvp.Value.Count != 0 && kvp.Value[^1].Value.ToString() != "0") .Min(kvp => kvp.Key); if (laterDate == null) {