From 6169cb84e52266ec329323eb2997af2b4ebf82e8 Mon Sep 17 00:00:00 2001 From: Citrinate Date: Sun, 24 Dec 2023 20:36:45 -0500 Subject: [PATCH] Fix off by 1 in logs --- FreePackages/Handlers/PackageHandler.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/FreePackages/Handlers/PackageHandler.cs b/FreePackages/Handlers/PackageHandler.cs index 2d878ec..55fcdaf 100644 --- a/FreePackages/Handlers/PackageHandler.cs +++ b/FreePackages/Handlers/PackageHandler.cs @@ -128,7 +128,7 @@ internal async static Task OnPICSRestart(uint oldChangeNumber) { // Search for the oldest change number which is still valid for apps var appChanges = await FindOldestPICSChanges(oldChangeNumber + 1, picsChanges.CurrentChangeNumber, findApps: true); if (appChanges != null) { - ASF.ArchiLogger.LogGenericDebug(String.Format("Recovered {0} app changes at change number {1}", appChanges.AppChanges.Count, appChanges.LastChangeNumber)); + ASF.ArchiLogger.LogGenericDebug(String.Format("Recovered {0} app changes at change number {1}", appChanges.AppChanges.Count, appChanges.LastChangeNumber + 1)); OnPICSChanges(appChanges.AppChanges, new Dictionary()); } @@ -142,7 +142,7 @@ internal async static Task OnPICSRestart(uint oldChangeNumber) { // Search for the oldest change number which is still valid for packages var packageChanges = await FindOldestPICSChanges(oldChangeNumber + 1, picsChanges.CurrentChangeNumber, findApps: false); if (packageChanges != null) { - ASF.ArchiLogger.LogGenericDebug(String.Format("Recovered {0} package changes at change number {1}", packageChanges.PackageChanges.Count, packageChanges.LastChangeNumber)); + ASF.ArchiLogger.LogGenericDebug(String.Format("Recovered {0} package changes at change number {1}", packageChanges.PackageChanges.Count, packageChanges.LastChangeNumber + 1)); OnPICSChanges(new Dictionary(), packageChanges.PackageChanges); }