diff options
Diffstat (limited to 'vcl/source/fontsubset/sft.cxx')
-rw-r--r-- | vcl/source/fontsubset/sft.cxx | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx index b51f2d3422ee..3bf3beac9080 100644 --- a/vcl/source/fontsubset/sft.cxx +++ b/vcl/source/fontsubset/sft.cxx @@ -1458,11 +1458,6 @@ int GetTTGlyphComponents(AbstractTrueTypeFont *ttf, sal_uInt32 glyphID, std::vec if (nOffset > nNextOffset) return 0; - const sal_uInt8* ptr = glyf + nOffset; - const sal_uInt8* nptr = glyf + nNextOffset; - if (nptr < ptr) - return 0; - if (std::find(glyphlist.begin(), glyphlist.end(), glyphID) != glyphlist.end()) { SAL_WARN("vcl.fonts", "Endless loop found in a compound glyph."); @@ -1472,9 +1467,10 @@ int GetTTGlyphComponents(AbstractTrueTypeFont *ttf, sal_uInt32 glyphID, std::vec glyphlist.push_back( glyphID ); // Empty glyph. - if (nptr == ptr) + if (nOffset == nNextOffset) return n; + const auto* ptr = glyf + nOffset; sal_uInt32 nRemainingData = glyflength - nOffset; if (nRemainingData >= 10 && GetInt16(ptr, 0) == -1) { |