diff --git a/tsschecker/tsschecker.c b/tsschecker/tsschecker.c index 88c77a46..cd54e356 100644 --- a/tsschecker/tsschecker.c +++ b/tsschecker/tsschecker.c @@ -223,8 +223,12 @@ plist_t getBuildidentityWithBoardconfig(plist_t buildManifest, const char *board plist_get_string_val(RestoreBehavior, &string); //assuming there are only Erase and Update. If it's not Erase it must be Update //also converting isUpdateInstall to bool (1 or 0) - if (strncmp(string, "Erase", strlen(string)) != (isUpdateInstall != 0)) + if ((strncmp(string, "Erase", strlen(string)) != 0) == !isUpdateInstall){ + //continue when Erase found but isUpdateInstall is true + //or Update found and isUpdateInstall is false rt = NULL; + continue; + } plist_t DeviceClass = plist_dict_get_item(infodict, "DeviceClass"); if (!DeviceClass || plist_get_node_type(DeviceClass) != PLIST_STRING){