aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRyan Luchs <rluchs107@gmail.comclear>2019-07-06 21:44:58 (GMT)
committerRyan Luchs <rluchs107@gmail.comclear>2019-07-06 21:44:58 (GMT)
commitad410a5c933ec6a6aec6645a108b85f2aa906a02 (patch)
treeea0477570c5f52c59ac8e3f7171bdd9f7eb54de1 /src
parente792fff30fabdc070aed577fe9f2bf94f4bc9923 (diff)
downloadfluxbox-ad410a5c933ec6a6aec6645a108b85f2aa906a02.zip
fluxbox-ad410a5c933ec6a6aec6645a108b85f2aa906a02.tar.bz2
removed potential division by zero with size zero fonts
Diffstat (limited to 'src')
-rw-r--r--src/FbTk/XftFontImp.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/FbTk/XftFontImp.cc b/src/FbTk/XftFontImp.cc
index fa34404..f5a6f9a 100644
--- a/src/FbTk/XftFontImp.cc
+++ b/src/FbTk/XftFontImp.cc
@@ -79,7 +79,7 @@ bool XftFontImp::load(const std::string &name) {
79 // number of glyphs by calculating the amount of 'WW' (pretending a 'wide' 79 // number of glyphs by calculating the amount of 'WW' (pretending a 'wide'
80 // glyph) fitting into 32k pixels 80 // glyph) fitting into 32k pixels
81 unsigned int tw = textWidth("WW", 2); 81 unsigned int tw = textWidth("WW", 2);
82 m_maxlength = 0x8000 / tw; 82 m_maxlength = 0x8000 / (tw == 0 ? 1 : tw);
83 83
84 return true; 84 return true;
85} 85}