From 5aebc4ffb44e18bc163420f86c604d72bab23d3e Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Tue, 8 Mar 2011 11:07:21 -0800 Subject: Copy strings that might get yanked from under us. --- MobileCydia.mm | 13 ++++++++----- 1 file 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]; -- cgit v1.2.3