diff options
author | markt <markt> | 2007-02-25 17:39:47 (GMT) |
---|---|---|
committer | markt <markt> | 2007-02-25 17:39:47 (GMT) |
commit | 68aa6be21661205004e05b49d96f2571df3a8ff7 (patch) | |
tree | 7e742b8e0b5110948a989fc5b2be9344c93b1536 /src/FbTk | |
parent | 61ed1fcfb0fe72eb26ffec0963b2501d30b3c4f5 (diff) | |
download | fluxbox_pavel-68aa6be21661205004e05b49d96f2571df3a8ff7.zip fluxbox_pavel-68aa6be21661205004e05b49d96f2571df3a8ff7.tar.bz2 |
little sanity check
Diffstat (limited to 'src/FbTk')
-rw-r--r-- | src/FbTk/XmbFontImp.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/FbTk/XmbFontImp.cc b/src/FbTk/XmbFontImp.cc index b1fd991..025f96d 100644 --- a/src/FbTk/XmbFontImp.cc +++ b/src/FbTk/XmbFontImp.cc | |||
@@ -292,6 +292,8 @@ unsigned int XmbFontImp::textWidth(const FbString &text, unsigned int len) const | |||
292 | #endif // X_HAVE_UTF8_STRING | 292 | #endif // X_HAVE_UTF8_STRING |
293 | 293 | ||
294 | string localestr = text; | 294 | string localestr = text; |
295 | if (len > localestr.length()) | ||
296 | len = localestr.length(); | ||
295 | localestr.erase(len, string::npos); | 297 | localestr.erase(len, string::npos); |
296 | localestr = FbStringUtil::FbStrToLocale(localestr); | 298 | localestr = FbStringUtil::FbStrToLocale(localestr); |
297 | XmbTextExtents(m_fontset, localestr.data(), localestr.size(), | 299 | XmbTextExtents(m_fontset, localestr.data(), localestr.size(), |