summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Cydia/MIMEAddress.mm2
-rw-r--r--MobileCydia.mm2
2 files changed, 2 insertions, 2 deletions
diff --git a/Cydia/MIMEAddress.mm b/Cydia/MIMEAddress.mm
index e4dcbab..65f29ec 100644
--- a/Cydia/MIMEAddress.mm
+++ b/Cydia/MIMEAddress.mm
@@ -61,7 +61,7 @@
- (id) initWithString:(NSString *)string {
if ((self = [super init]) != nil) {
const char *data = [string UTF8String];
- size_t size = [string length];
+ size_t size = [string lengthOfBytesUsingEncoding:NSUTF8StringEncoding];
static Pcre address_r("^\"?(.*)\"? <([^>]*)>$");
diff --git a/MobileCydia.mm b/MobileCydia.mm
index 97ff1d4..8e4c796 100644
--- a/MobileCydia.mm
+++ b/MobileCydia.mm
@@ -834,7 +834,7 @@ NSString *LocalizeSection(NSString *section) {
NSString *Simplify(NSString *title) {
const char *data = [title UTF8String];
- size_t size = [title length];
+ size_t size = [title lengthOfBytesUsingEncoding:NSUTF8StringEncoding];
static Pcre square_r("^\\[(.*)\\]$");
if (square_r(data, size))