]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Fixed a crash when spanningtree is given a blank line; really simple fix, and I had...
authorspecial <special@e03df62e-2008-0410-955e-edbf42e46eb7>
Tue, 28 Nov 2006 01:46:11 +0000 (01:46 +0000)
committerspecial <special@e03df62e-2008-0410-955e-edbf42e46eb7>
Tue, 28 Nov 2006 01:46:11 +0000 (01:46 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5823 e03df62e-2008-0410-955e-edbf42e46eb7

src/modules/m_spanningtree.cpp

index 37132059c4a8a16d994592e71ec3a37a4d1ed1e5..60eb650dd17748aa078a723db55f2b78a62a1e66 100644 (file)
@@ -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);