summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-12-22 21:27:42 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-12-22 21:27:42 +0000
commit18d1a07987501c2fa9a77cca5f0d5962be0cba38 (patch)
treefefcf4ab62c88cade98a1371cd0913a84b6ff85e
parent79939d71bac1fdf6241decb77180dc12710af0d2 (diff)
Uninitialized values: fun for ALL the family this xmas time.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6065 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/configreader.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp
index e0c466097..dde2d04db 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -792,15 +792,19 @@ void ServerConfig::Read(bool bail, userrec* user)
case DT_CHARPTR:
{
char item[MAXBUF];
- ConfValue(this->config_data, MultiValues[Index].tag, MultiValues[Index].items[valuenum], tagnum, item, MAXBUF, allow_newlines);
- vl.push_back(ValueItem(item));
+ if (ConfValue(this->config_data, MultiValues[Index].tag, MultiValues[Index].items[valuenum], tagnum, item, MAXBUF, allow_newlines))
+ vl.push_back(ValueItem(item));
+ else
+ vl.push_back(ValueItem(""));
}
break;
case DT_INTEGER:
{
- int item;
- ConfValueInteger(this->config_data, MultiValues[Index].tag, MultiValues[Index].items[valuenum], tagnum, item);
- vl.push_back(ValueItem(item));
+ int item = 0;
+ if (ConfValueInteger(this->config_data, MultiValues[Index].tag, MultiValues[Index].items[valuenum], tagnum, item))
+ vl.push_back(ValueItem(item));
+ else
+ vl.push_back(ValueItem(0));
}
break;
case DT_BOOLEAN: