Added handling of potential zero divisor

This commit is contained in:
Robert Osfield 2016-06-30 08:14:48 +01:00
parent 1c2aeb3138
commit 77812b32e0

View File

@ -221,7 +221,7 @@ TXFFont::loadFont(std::istream& stream)
return false;
}
float coord_scale = 1.0f/float(computedmaxheight);
float coord_scale = (computedmaxheight>0.0f) ? (1.0f/float(computedmaxheight)) : 1.0f;
{
// insert a trivial blank character