From 7395ae9a1b14359190338dff9955c0268e0fe3fd Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 4 Aug 2006 15:47:06 +0000 Subject: Fixes? git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4710 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/modules') diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index d3d112ff4..0b7e20787 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -1153,10 +1153,13 @@ class TreeSocket : public InspSocket modelist[0] = params[0].c_str(); modelist[1] = to_keep.c_str(); - for (n = 2; (q < params.size()) && (n < 64); n++) + if (params_to_keep.size() > 2) { - log(DEBUG,"Item %d of %d",n, params.size()); - modelist[n] = params_to_keep[q++].c_str(); + for (q = 2; (q < params_to_keep.size()) && (q < 64); q++) + { + log(DEBUG,"Item %d of %d", q, params_to_keep.size()); + modelist[n++] = params_to_keep[q].c_str(); + } } if (smode) -- cgit v1.2.3