mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-19 10:25:27 +00:00
Monotone-Parent: 1b230d2b3187795587acf307f4f13e37ed612a08
Monotone-Revision: 2fba878ec8713c26f41ffeb5cf08c75601a7c6b0 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2011-07-27T21:51:00 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
2011-07-27 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* OpenChange/NSString+MAPIStore.m (-asUnicodeInMemCtx): return an
|
||||
empty string when length == 0, otherwise the resulting pointer
|
||||
will be NULL.
|
||||
|
||||
* OpenChange/plreader.m: new test tool to dump property lists
|
||||
independently from their serialization format.
|
||||
|
||||
|
||||
@@ -33,8 +33,13 @@
|
||||
char *unicode;
|
||||
NSData *encoded;
|
||||
|
||||
encoded = [self dataUsingEncoding: NSUTF8StringEncoding];
|
||||
unicode = talloc_strndup (memCtx, [encoded bytes], [encoded length]);
|
||||
if ([self length] > 0)
|
||||
{
|
||||
encoded = [self dataUsingEncoding: NSUTF8StringEncoding];
|
||||
unicode = talloc_strndup (memCtx, [encoded bytes], [encoded length]);
|
||||
}
|
||||
else
|
||||
unicode = talloc_memdup (memCtx, "", 1);
|
||||
|
||||
return unicode;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user