diff options
Diffstat (limited to 'MobileCydia.mm')
-rw-r--r-- | MobileCydia.mm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm index 8b0ae70..03d76f5 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -1070,7 +1070,11 @@ NSString *SizeString(double size) { } static _finline CFStringRef CFCString(const char *value) { - return CFStringCreateWithBytesNoCopy(kCFAllocatorDefault, reinterpret_cast<const uint8_t *>(value), strlen(value), kCFStringEncodingUTF8, NO, kCFAllocatorNull); + size_t size(strlen(data)); + + return + CFStringCreateWithBytesNoCopy(kCFAllocatorDefault, reinterpret_cast<const uint8_t *>(data), size, kCFStringEncodingUTF8, NO, kCFAllocatorNull) ?: + CFStringCreateWithBytesNoCopy(kCFAllocatorDefault, reinterpret_cast<const uint8_t *>(data), size, kCFStringEncodingISOLatin1, NO, kCFAllocatorNull); } const char *StripVersion_(const char *version) { |