diff options
author | ryluchs17 <ryluchs17@saintjosephhs.com> | 2019-07-07 23:07:56 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-07 23:07:56 (GMT) |
commit | 368e2935e20b4148c91f4242bee39bb02cd296ae (patch) | |
tree | bbb16b66e385591ca5ccc78c44ff13fda6fb8880 | |
parent | ad410a5c933ec6a6aec6645a108b85f2aa906a02 (diff) | |
download | fluxbox-368e2935e20b4148c91f4242bee39bb02cd296ae.zip fluxbox-368e2935e20b4148c91f4242bee39bb02cd296ae.tar.bz2 |
zero check now uses std::max()
-rw-r--r-- | src/FbTk/XftFontImp.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/FbTk/XftFontImp.cc b/src/FbTk/XftFontImp.cc index f5a6f9a..9c09a5c 100644 --- a/src/FbTk/XftFontImp.cc +++ b/src/FbTk/XftFontImp.cc | |||
@@ -78,8 +78,8 @@ bool XftFontImp::load(const std::string &name) { | |||
78 | // overflow'). to prevent something like this we detect the maximium | 78 | // overflow'). to prevent something like this we detect the maximium |
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 = std::max(textWidth("WW", 2), 1); |
82 | m_maxlength = 0x8000 / (tw == 0 ? 1 : tw); | 82 | m_maxlength = 0x8000 / tw; |
83 | 83 | ||
84 | return true; | 84 | return true; |
85 | } | 85 | } |