--- a/textrendering/textformatting/tagma/TMGLYPH.CPP Mon May 03 14:13:26 2010 +0300
+++ b/textrendering/textformatting/tagma/TMGLYPH.CPP Thu Jun 24 11:18:23 2010 +0800
@@ -19,6 +19,11 @@
#include "TMSTD.H"
#include <bidi.h>
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "TMGLYPHTraces.h"
+#endif
+
inline TBool IsSurrogate(TText a) { return 0xD800 == (a & 0xF800); }
@@ -312,6 +317,10 @@
TPtrC text;
aSource.GetText(aStart, text, dummy);
TInt textEnd = aStart + text.Length();
+ if (aStart >= textEnd)
+ {
+ OstTrace0( TRACE_FATAL, DUP1__APPENDTEXTTOBUFFER, "EZeroLengthTextSupplied" );
+ }
__ASSERT_ALWAYS(aStart < textEnd, TmPanic(EZeroLengthTextSupplied));
if (aEnd < textEnd)
{
@@ -413,6 +422,10 @@
TDisplayedTextDirectionality aDirectionality, TText* aBuffer,TUint aContextChar,
TTmCharFormat* aFormat, CTmTextFontCache** aFont)
{
+ if (aStart > aEnd)
+ {
+ OstTrace0( TRACE_DUMP, RTMTEXTCACHE_GETDISPLAYEDTEXT, "EBadArg" );
+ }
__ASSERT_DEBUG(aStart <= aEnd, TmPanic(EBadArg));
if (aContextChar == 0)
aBuffer[0] = 0xFFFF;
@@ -463,7 +476,7 @@
if (CFont::CharactersJoin(
aDirectionality == ELeftToRight? prevChar : c,
aDirectionality == ELeftToRight? c : prevChar)
- && format.iFontSpec == prevFormat.iFontSpec)
+ && format == prevFormat)
// Characters join at the beginning.
*output = KZeroWidthJoiner;
}
@@ -530,7 +543,7 @@
if (CFont::CharactersJoin(
aDirectionality == ELeftToRight? *prev : nextChar,
aDirectionality == ELeftToRight? nextChar : *prev)
- && format.iFontSpec == nextFormat.iFontSpec)
+ && format == nextFormat)
// Characters join at the end.
*output = KZeroWidthJoiner;
}