summaryrefslogtreecommitdiff
path: root/src/configreader.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-04-06 13:07:55 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-04-06 13:07:55 +0000
commit39f2fa9ccf916b6afc084bee6d872214a8a70323 (patch)
tree7a948c9eb9c630b74f43c205b7e3f6d26e15a9ec /src/configreader.cpp
parentf3e184c5402c184c94847ee79469cb0120bf84c4 (diff)
Fix the previous commit better - always copy the null terminator (oops)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6744 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/configreader.cpp')
-rw-r--r--src/configreader.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp
index 5e7ef67ca..bdc84de0b 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -723,9 +723,8 @@ void ServerConfig::Read(bool bail, userrec* user)
case DT_CHARPTR:
{
ValueContainerChar* vcc = (ValueContainerChar*)Values[Index].val;
- /* We do this so that an empty string can still be copied */
- size_t length = strlen(vi.GetString());
- vcc->Set(vi.GetString(), length ? length : 1);
+ /* Make sure we also copy the null terminator */
+ vcc->Set(vi.GetString(), strlen(vi.GetString()) + 1);
}
break;
case DT_INTEGER: