From 4f78f5157f2a1db67628a922b0320f3162c12d87 Mon Sep 17 00:00:00 2001 From: brain Date: Tue, 20 Apr 2004 09:23:57 +0000 Subject: ConfigReader fixes to cope with tab characters (why didnt we notice this before?) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@680 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/modules.cpp') diff --git a/src/modules.cpp b/src/modules.cpp index c042a8fed..ca3c2e423 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -355,9 +355,15 @@ ConfigReader::ConfigReader(std::string filename) std::string ConfigReader::ReadValue(std::string tag, std::string name, int index) { + log(DEBUG,"ConfigReader::ReadValue '%s' '%s' %d",tag.c_str(),name.c_str(),index); char val[MAXBUF]; - ReadConf(cache,tag.c_str(),name.c_str(),index,val); - return val; + char t[MAXBUF]; + char n[MAXBUF]; + strncpy(t,tag.c_str(),MAXBUF); + strncpy(n,name.c_str(),MAXBUF); + ReadConf(cache,t,n,index,val); + log(DEBUG,"ConfigReader::ReadValue read '%s'",val); + return std::string(val); } -- cgit v1.3.1-10-gc9f91