diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2011-03-08 11:07:21 -0800 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2011-03-08 11:07:21 -0800 |
commit | 5aebc4ffb44e18bc163420f86c604d72bab23d3e (patch) | |
tree | c7318fa81285b5efb3939125a48c1b2efda9e22c | |
parent | 2e35f65ff2021b7acd80bf9716d35cf526c69de5 (diff) |
Copy strings that might get yanked from under us.
-rw-r--r-- | MobileCydia.mm | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm index 58fcd07..f5420af 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -5092,12 +5092,15 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { Source *source = [package source]; icon_ = [package icon]; - name_ = [package name]; + name_ = [NSString stringWithString:[package name]]; - if (IsWildcat_) - description_ = [package longDescription]; - if (description_ == nil) - description_ = [package shortDescription]; + NSString *description(nil); + if (description == nil && IsWildcat_) + description = [package longDescription]; + if (description == nil) + description = [package shortDescription]; + + description_ = [NSString stringWithString:description]; commercial_ = [package isCommercial]; |