From 18d1a07987501c2fa9a77cca5f0d5962be0cba38 Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 22 Dec 2006 21:27:42 +0000 Subject: 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 --- src/configreader.cpp | 14 +++++++++----- 1 file 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: -- cgit v1.2.3