From: special Date: Tue, 28 Nov 2006 01:46:11 +0000 (+0000) Subject: Fixed a crash when spanningtree is given a blank line; really simple fix, and I had... X-Git-Tag: v2.0.23~6556 X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=5da606a02777de3d91f3b88d278ce49cadb67af5;p=user%2Fhenk%2Fcode%2Finspircd.git 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 --- 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);