Jeck - Minor bugfix: prevent garbage characters from appearing in JLBFont.
This commit is contained in:
@@ -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];
|
||||||
|
|||||||
Reference in New Issue
Block a user