Fix assert in shaper.
Need and 'in range' operator.
Change-Id: I57cd6631376a6e857054b4712a70b2aa75a53223
Reviewed-on: https://skia-review.googlesource.com/c/192823
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
diff --git a/modules/skshaper/src/SkShaper_harfbuzz.cpp b/modules/skshaper/src/SkShaper_harfbuzz.cpp
index b69a1d9..2d0a8d9 100644
--- a/modules/skshaper/src/SkShaper_harfbuzz.cpp
+++ b/modules/skshaper/src/SkShaper_harfbuzz.cpp
@@ -954,7 +954,8 @@
modelText.reset(new TextProps[utf8runLength + 1]());
size_t modelStartCluster = utf8Start - utf8;
for (int i = 0; i < model.fNumGlyphs; ++i) {
- SkASSERT(modelStartCluster <= model.fGlyphs[i].fCluster < utf8End - utf8);
+ SkASSERT(modelStartCluster <= model.fGlyphs[i].fCluster);
+ SkASSERT( model.fGlyphs[i].fCluster < utf8End - utf8);
if (!model.fGlyphs[i].fUnsafeToBreak) {
modelText[model.fGlyphs[i].fCluster - modelStartCluster].glyphLen = i;
modelText[model.fGlyphs[i].fCluster - modelStartCluster].advance = advance;