mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-11-22 23:14:22 +00:00
Monotone-Parent: 26b5f40103235f325bd04edf2ca9fe43ad924990
Monotone-Revision: 859fadbbfd184b571c9fd10283255e4f5471f95a Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-12-14T15:07:06 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
1 parent
9595a07c82
commit
01aa8e299c
4 files changed
+26
-20
No files matched your search
@@ -379,7 +379,8 @@ convertChars (const char *oldString, unsigned int oldLength,
|
||||
if (length + paddingBuffer > maxLength - 6)
|
||||
{
|
||||
maxLength += paddingBuffer;
|
||||
reallocated = NSZoneRealloc (NULL, newString, maxLength + 1);
|
||||
reallocated = NSZoneRealloc (NULL, newString,
|
||||
maxLength + 1);
|
||||
if (reallocated)
|
||||
{
|
||||
newString = reallocated;
|
||||
@@ -408,13 +409,13 @@ convertChars (const char *oldString, unsigned int oldLength,
|
||||
- (NSString *) stringByConvertingCRLNToHTML
|
||||
{
|
||||
NSString *convertedString;
|
||||
const char *utf8String;
|
||||
char *newString;
|
||||
unsigned int newLength;
|
||||
|
||||
newString
|
||||
= convertChars ([self cStringUsingEncoding: NSUTF8StringEncoding],
|
||||
[self lengthOfBytesUsingEncoding: NSUTF8StringEncoding],
|
||||
&newLength);
|
||||
utf8String = [self UTF8String];
|
||||
newString = convertChars (utf8String, strlen (utf8String),
|
||||
&newLength);
|
||||
convertedString = [[NSString alloc] initWithBytes: newString
|
||||
length: newLength
|
||||
encoding: NSUTF8StringEncoding];
|
||||
|
||||
Reference in new issue
Block a user