summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2017-02-16 11:29:49 -0800
committerJay Freeman (saurik) <saurik@saurik.com>2017-02-16 11:29:49 -0800
commite65eba85e36a518ccad605c715a88b4ee59ce439 (patch)
treea33cb980f00e841e4875e303e45b178e25a8d4df
parenta3d01a768f0e7f9d5a36b4bcea04458634818863 (diff)
Avoid counting a package as "lost" multiple times.
-rw-r--r--MobileCydia.mm15
1 files changed, 8 insertions, 7 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm
index 64bc7ab..a16f194 100644
--- a/MobileCydia.mm
+++ b/MobileCydia.mm
@@ -3909,20 +3909,21 @@ class CydiaLogCleaner :
continue;
} else {
std::swap(package, packages[index]);
- if (package != nil)
+ if (package != nil) {
+ if (package.metadata->index_ == index + 1)
+ ++lost;
goto lost;
+ }
if (last != index)
continue;
}
- } else lost: {
+ } else {
++lost;
- if (last == packages.size()) {
+ lost: if (last == packages.size())
packages.push_back(package);
- ++last;
- } else {
+ else
packages[last] = package;
- ++last;
- }
+ ++last;
}
for (; last != packages.size(); ++last)