From 6b8c469e2c425696f9138d6d19ddfe16824e9ec5 Mon Sep 17 00:00:00 2001 From: MadCamel Date: Wed, 11 Feb 2009 19:27:13 -0500 Subject: Fixed crash when sending a blank item link --- src/gui/chat.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) && -- cgit v1.2.3-70-g09d2