Permalink
Browse files

Fix bad gid crash in segcache. Not that anyone uses segcache

  • Loading branch information...
1 parent c36204c commit f67e446f6637d5845a4df55e83a4f8a0eb7ad42b @mhosken mhosken committed Mar 9, 2016
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/CachedFace.cpp
View
@@ -72,7 +72,7 @@ bool CachedFace::runGraphite(Segment *seg, const Silf *pSilf) const
for (unsigned int i = 0; i < seg->charInfoCount(); ++i)
{
const unsigned int length = i - subSegStart + 1;
- if (length < eMaxSpliceSize)
+ if (length < eMaxSpliceSize && subSegEndSlot->gid() < m_cacheStore->maxCmapGid())
cmapGlyphs[length-1] = subSegEndSlot->gid();
else return false;
const bool spaceOnly = m_cacheStore->isSpaceGlyph(subSegEndSlot->gid());

0 comments on commit f67e446

Please sign in to comment.