From b0e067b8045396b35ab36b4c4c2912e6142c934c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Fri, 21 Jan 2005 02:00:16 +0000 Subject: [PATCH] Fixed a bug in write_unicode_char() - it returned the size of the character not how many bytes were actually written (which could differ with newlines and indention). Now use the new rgb_color == operator instead of a memcmp(). git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10922 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/translators/rtftranslator/convert.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/add-ons/translators/rtftranslator/convert.cpp b/src/add-ons/translators/rtftranslator/convert.cpp index b394d4a959..fb36a6cf1b 100644 --- a/src/add-ons/translators/rtftranslator/convert.cpp +++ b/src/add-ons/translators/rtftranslator/convert.cpp @@ -159,8 +159,7 @@ write_unicode_char(conversion_context &context, uint32 c, length = 4; } - write_text(context, bytes, length, target); - return length; + return write_text(context, bytes, length, target); } @@ -260,7 +259,7 @@ text_runs_are_equal(text_run *a, text_run *b) return false; return a->offset == b->offset - && !memcmp(&a->color, &b->color, sizeof(rgb_color)) + && a->color == b->color && a->font == b->font; }