diff options
author | Ryan Luchs <rluchs107@gmail.comclear> | 2019-07-06 21:44:58 (GMT) |
---|---|---|
committer | Ryan Luchs <rluchs107@gmail.comclear> | 2019-07-06 21:44:58 (GMT) |
commit | ad410a5c933ec6a6aec6645a108b85f2aa906a02 (patch) | |
tree | ea0477570c5f52c59ac8e3f7171bdd9f7eb54de1 /src | |
parent | e792fff30fabdc070aed577fe9f2bf94f4bc9923 (diff) | |
download | fluxbox-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.cc | 2 |
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 | } |