summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarkt <markt>2007-02-25 17:39:47 (GMT)
committermarkt <markt>2007-02-25 17:39:47 (GMT)
commit68aa6be21661205004e05b49d96f2571df3a8ff7 (patch)
tree7e742b8e0b5110948a989fc5b2be9344c93b1536
parent61ed1fcfb0fe72eb26ffec0963b2501d30b3c4f5 (diff)
downloadfluxbox_lack-68aa6be21661205004e05b49d96f2571df3a8ff7.zip
fluxbox_lack-68aa6be21661205004e05b49d96f2571df3a8ff7.tar.bz2
little sanity check
-rw-r--r--src/FbTk/XmbFontImp.cc2
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(),