From 18f4470fedceab26dc4f5f27d3d61a3e15179849 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Fri, 2 May 2008 23:09:55 +0000 Subject: [PATCH] Monotone-Parent: 8e81030e83aa6ed594c40a5f56274b5ba292f47c Monotone-Revision: d61516dbee88e6bc6828689bf6efabde759a5a80 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2008-05-02T23:09:55 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 4 ++++ UI/MailPartViewers/UIxMailPartTextViewer.m | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 58e8c7bf2..1d307b16f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2008-05-02 Wolfgang Sourdeau + * UI/MailPartViewers/UIxMailPartTextViewer.m (convertChars): do + not cast pointers to unsigned int to avoid problems with big + endian archs. + * SoObjects/Contacts/SOGoContactLDAPFolder.m ([-davNamespaces]): removed method. diff --git a/UI/MailPartViewers/UIxMailPartTextViewer.m b/UI/MailPartViewers/UIxMailPartTextViewer.m index e84ce944b..c8d203479 100644 --- a/UI/MailPartViewers/UIxMailPartTextViewer.m +++ b/UI/MailPartViewers/UIxMailPartTextViewer.m @@ -61,13 +61,13 @@ convertChars (const char *oldString, unsigned int oldLength, iteration = 0; upperLimit = oldString + oldLength; - while ((unsigned int) currentChar < (unsigned int) upperLimit) + while (currentChar < upperLimit) { if (*currentChar != '\r') { if (*currentChar == '\n') { - length = (unsigned int) destChar - (unsigned int) newString; + length = destChar - newString; if ((length + (6 * iteration) + 500) > maxLength) { maxLength = length + (iteration * 6) + 500; @@ -93,7 +93,7 @@ convertChars (const char *oldString, unsigned int oldLength, currentChar++; } *destChar = 0; - *newLength = (unsigned int) destChar - (unsigned int) newString; + *newLength = destChar - newString; return newString; }