From e98e4af73c4d8899ee88c3e7f8f13fc3b6dc7032 Mon Sep 17 00:00:00 2001 From: David Turner Date: Mon, 6 Mar 2000 17:01:07 +0000 Subject: [PATCH] fixed a nasty bug that occured with CMAP format 4.. --- src/sfnt/ttcmap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sfnt/ttcmap.c b/src/sfnt/ttcmap.c index 1187e4ef6..7a1a2ad70 100644 --- a/src/sfnt/ttcmap.c +++ b/src/sfnt/ttcmap.c @@ -438,7 +438,7 @@ seg4 = cmap4->segments; limit = seg4 + segCount; - for ( ; seg4 < limit; seg4++ ) + for ( ; seg4 < limit; seg4++, segCount-- ) { if ( charCode <= seg4->endCount ) { @@ -455,7 +455,7 @@ /* otherwise, we must use the glyphIdArray to do it */ { index1 = seg4->idRangeOffset/2 + (charCode - seg4->startCount) - - (segCount-1); + - segCount; if ( index1 < cmap4->numGlyphId && cmap4->glyphIdArray[index1] != 0 )