From feebd9bbc3604877035f5cc9ba5aee960cf942b8 Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 8 Apr 2007 17:10:48 +0000 Subject: It might be slightly slower, but memset the array as we're using it as a matrix not a simple char*. This will mean that the possibility of past data being left behind in the buffer wont happen git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6762 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree/main.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/modules') diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp index 97da561b6..9205077cf 100644 --- a/src/modules/m_spanningtree/main.cpp +++ b/src/modules/m_spanningtree/main.cpp @@ -184,6 +184,9 @@ void ModuleSpanningTree::ShowMap(TreeServer* Current, userrec* user, int depth, } float percent; char text[128]; + /* Neat and tidy default values, as we're dealing with a matrix not a simple string */ + memset(text, 0, 128); + if (ServerInstance->clientlist->size() == 0) { // If there are no users, WHO THE HELL DID THE /MAP?!?!?! percent = 0; -- cgit v1.2.3