summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui/chat.cpp2
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) &&