From e613efa6a00797d6ab19ce339a50e2c759fb7a6a Mon Sep 17 00:00:00 2001 From: Mikael Sand Date: Fri, 10 Aug 2018 01:14:11 +0300 Subject: [PATCH] [ios] Fix unicode emoji off by one error. --- ios/Text/RNSVGTSpan.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/Text/RNSVGTSpan.m b/ios/Text/RNSVGTSpan.m index 797a1277..489cb8cb 100644 --- a/ios/Text/RNSVGTSpan.m +++ b/ios/Text/RNSVGTSpan.m @@ -689,7 +689,7 @@ static double RNSVGTSpan_radToDeg = 180 / M_PI; CTRunGetStringIndices(run, CFRangeMake(0, 0), indices); CTFontRef runFont = CFDictionaryGetValue(CTRunGetAttributes(run), kCTFontAttributeName); CTFontGetAdvancesForGlyphs(runFont, kCTFontOrientationHorizontal, glyphs, advances, runGlyphCount); - CFIndex nextOrEndRunIndex = n - 1; + CFIndex nextOrEndRunIndex = n; if (r + 1 < runEnd) { CTRunRef nextRun = CFArrayGetValueAtIndex(runs, r + 1); CFIndex nextRunGlyphCount = CTRunGetGlyphCount(nextRun);