summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-07-20 08:53:56 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-07-20 08:53:56 +0000
commitca781714c1651a9e7042eb930c6b117449f8e1fc (patch)
tree626d56d3997cfffcfaecf8461ed6cfceed74b200 /src/modules/m_spanningtree
parent2d4a319d961e3f9e6aa9f7926f9ed320d72de8da (diff)
Fixes to some stuff that writes on memory it shouldn't (thanks psychon).
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10047 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_spanningtree')
-rw-r--r--src/modules/m_spanningtree/override_map.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/m_spanningtree/override_map.cpp b/src/modules/m_spanningtree/override_map.cpp
index b17e266b2..fca32b85b 100644
--- a/src/modules/m_spanningtree/override_map.cpp
+++ b/src/modules/m_spanningtree/override_map.cpp
@@ -43,7 +43,7 @@ void ModuleSpanningTree::ShowMap(TreeServer* Current, User* user, int depth, cha
// For Aligning, we need to work out exactly how deep this thing is, and produce
// a 'Spacer' String to compensate.
char spacer[40];
- memset(spacer,' ',40);
+ memset(spacer,' ',sizeof(spacer));
if ((40 - Current->GetName().length() - depth) > 1) {
spacer[40 - Current->GetName().length() - depth] = '\0';
}
@@ -55,7 +55,7 @@ void ModuleSpanningTree::ShowMap(TreeServer* Current, User* user, int depth, cha
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);
+ memset(text, 0, sizeof(text));
if (ServerInstance->Users->clientlist->size() == 0)
{