Jeck - Minor bugfix: prevent garbage characters from appearing in JLBFont.

This commit is contained in:
wagic.jeck
2009-12-10 15:53:23 +00:00
parent ee36281fa0
commit 9b0afb7105
+7
View File
@@ -132,7 +132,14 @@ void JLBFont::DrawString(const char *string, float x, float y, int align, float
continue; continue;
} }
//Skip characters with no encoding.
if((*p - 32) < 0 || (*p - 32) > 127){
p++;
continue;
}
index = (*p - 32)+mBase; index = (*p - 32)+mBase;
float charWidth = mCharWidth[index]; float charWidth = mCharWidth[index];
float delta = (charWidth + mTracking) * mScale; float delta = (charWidth + mTracking) * mScale;
float xPos = mXPos[index]; float xPos = mXPos[index];