From c2160ae367fd47ce34033ae257116272ed125124 Mon Sep 17 00:00:00 2001 From: CTCaer Date: Sun, 14 Jun 2020 13:55:41 +0300 Subject: [PATCH] hos: Fix a long standing bug with kip1 patches The kip1 patcher since its inception was checking for patches wrongly. This would create an edge case scenario, where up to 1 patch could be skipped. --- bootloader/hos/pkg2.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bootloader/hos/pkg2.c b/bootloader/hos/pkg2.c index d192c2a..df2b3b5 100644 --- a/bootloader/hos/pkg2.c +++ b/bootloader/hos/pkg2.c @@ -1095,11 +1095,12 @@ const char* pkg2_patch_kips(link_t *info, char* patchNames) { for (u32 i = 0; i < numPatches; i++) { + // Continue if patch name does not match. if (strcmp(currPatchset->name, patches[i]) != 0) - { - bitsAffected = i + 1; - break; - } + continue; + + bitsAffected = i + 1; + break; } currPatchset++; }