From e910a0a3b707cb1800d949094bfaa3f5d5258f7e Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Fri, 24 Dec 2010 00:58:57 +0000 Subject: [PATCH] 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 --- src/servers/app/ServerFont.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/servers/app/ServerFont.cpp b/src/servers/app/ServerFont.cpp index 53b3d4d327..44e2e42d0c 100644 --- a/src/servers/app/ServerFont.cpp +++ b/src/servers/app/ServerFont.cpp @@ -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; }