CID 4186: The glyph_index is unsigned, so a >= 0 comparison is always true. The

"empty glyph index" as per freetype (which is eventually called) actually is 0,
so a != 0 comparison should be correct. Untested though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39929 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Lotz
2010-12-24 00:58:57 +00:00
parent 1550ecf11a
commit e910a0a3b7
+1 -1
View File
@@ -452,7 +452,7 @@ class HasGlyphsConsumer {
bool ConsumeGlyph(int32 index, uint32 charCode, const GlyphCache* glyph,
FontCacheEntry* entry, double x, double y)
{
fHasArray[index] = glyph->glyph_index >= 0;
fHasArray[index] = glyph->glyph_index != 0;
return true;
}