From 5da606a02777de3d91f3b88d278ce49cadb67af5 Mon Sep 17 00:00:00 2001 From: special Date: Tue, 28 Nov 2006 01:46:11 +0000 Subject: Fixed a crash when spanningtree is given a blank line; really simple fix, and I had to wait 10 minutes to test it :< git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5823 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index 37132059c..60eb650dd 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -3064,11 +3064,11 @@ class TreeSocket : public InspSocket irc::string command; std::string prefix; + line = line.substr(0, line.find_first_of("\r\n")); + if (line.empty()) return true; - line = line.substr(0, line.find_first_of("\r\n")); - Instance->Log(DEBUG,"IN: %s", line.c_str()); this->Split(line.c_str(),params); -- cgit v1.2.3