Added handling of potential zero divisor
This commit is contained in:
parent
1c2aeb3138
commit
77812b32e0
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user