diff options
author | MadCamel <madcamel@gmail.com> | 2009-02-11 19:27:13 -0500 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2009-02-11 18:26:40 -0700 |
commit | 6b8c469e2c425696f9138d6d19ddfe16824e9ec5 (patch) | |
tree | cb5d8e412a0efac01d4a3afb84b5e3d4f6cde707 | |
parent | 93eb477c5f6ab3d111bf26138708f5917c3c9f3d (diff) | |
download | mana-client-6b8c469e2c425696f9138d6d19ddfe16824e9ec5.tar.gz mana-client-6b8c469e2c425696f9138d6d19ddfe16824e9ec5.tar.bz2 mana-client-6b8c469e2c425696f9138d6d19ddfe16824e9ec5.tar.xz mana-client-6b8c469e2c425696f9138d6d19ddfe16824e9ec5.zip |
Fixed crash when sending a blank item link
-rw-r--r-- | src/gui/chat.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/chat.cpp b/src/gui/chat.cpp index 953a9a37..fbd24377 100644 --- a/src/gui/chat.cpp +++ b/src/gui/chat.cpp @@ -365,7 +365,7 @@ void ChatWindow::chatSend(const std::string &nick, std::string msg) while (start != std::string::npos && msg[start+1] != '@') { std::string::size_type end = msg.find(']', start); - if (end != std::string::npos) + if (start+1 != end && end != std::string::npos) { // Catch multiple embeds and ignore them so it doesn't crash the client. while ((msg.find('[', start + 1) != std::string::npos) && |