zero check now uses std::max()
ryluchs17 ryluchs17@saintjosephhs.com
PGP Signature
-----BEGIN PGP SIGNATURE----- wsBcBAABCAAQBQJdIntMCRBK7hj4Ov3rIwAAdHIIAAVkaB7vYHOjnkXXBr7JF26o gddX9dxa/JntqIuq3EVaPlQKKfuAmE8a8ecszebA+mW03SOhEt1MeY6H4HIkmHfM HDjn7rEWR7AsOShDI/tPIb+4Zy/uy4i+ggvkMmbLhi1M0vMRyzLGuwmWs5RRc+rs DOdDeG1xStYDwo87Iwg7QdCHBhJfhudBKtxel337Byp61mbdEV9Jjlkysj2W/Dp4 Mx1l2ZebjXBmFmnaW1zPgyyi49zzwkhZWnNtC+wZeQXp5yd2hvhGlX7cuXaPGeib LbeW9+eKDFVHumywG6oosS6AET5Dqkcr2BNzZgNQsEGbAcTnJu+NAx6qCJLOoE0= =lw1F -----END PGP SIGNATURE-----
1 files changed,
2 insertions(+),
2 deletions(-)
jump to
M
src/FbTk/XftFontImp.cc
→
src/FbTk/XftFontImp.cc
@@ -78,8 +78,8 @@ // yields either some negative or some 'wrapped' values ('integer
// overflow'). to prevent something like this we detect the maximium // number of glyphs by calculating the amount of 'WW' (pretending a 'wide' // glyph) fitting into 32k pixels - unsigned int tw = textWidth("WW", 2); - m_maxlength = 0x8000 / (tw == 0 ? 1 : tw); + unsigned int tw = std::max(textWidth("WW", 2), 1); + m_maxlength = 0x8000 / tw; return true; }