summaryrefslogtreecommitdiffstats
path: root/Swift
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2011-09-03 20:23:36 (GMT)
committerKevin Smith <git@kismith.co.uk>2011-09-03 20:23:36 (GMT)
commit83b526c1580a0a4effa01b5ffb710d7dfaea1e55 (patch)
tree78d279492ee2299be8e3354893564853f9617df7 /Swift
parent5dc7d1459b966ba5b848760bc43cbb1242d5da80 (diff)
downloadswift-contrib-83b526c1580a0a4effa01b5ffb710d7dfaea1e55.zip
swift-contrib-83b526c1580a0a4effa01b5ffb710d7dfaea1e55.tar.bz2
Workaround for Boost empty string split bug
Diffstat (limited to 'Swift')
-rw-r--r--Swift/Controllers/Chat/ChatsManager.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/Swift/Controllers/Chat/ChatsManager.cpp b/Swift/Controllers/Chat/ChatsManager.cpp
index 56f7a4c..d631494 100644
--- a/Swift/Controllers/Chat/ChatsManager.cpp
+++ b/Swift/Controllers/Chat/ChatsManager.cpp
@@ -108,6 +108,10 @@ void ChatsManager::saveRecents() {
foreach (ChatListWindow::Chat chat, recentChats_) {
std::vector<std::string> activity;
boost::split(activity, chat.activity, boost::is_any_of("\t\n"));
+ if (activity.size() == 0) {
+ /* Work around Boost bug https://svn.boost.org/trac/boost/ticket/4751 */
+ activity.push_back("");
+ }
std::string recent = chat.jid.toString() + "\t" + activity[0] + "\t" + (chat.isMUC ? "true" : "false") + "\t" + chat.nick;
recents += recent + "\n";
if (i++ > 25) {