From ea36f2bb1b8b1bf03b8615672866f93697caff75 Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 4 Sep 2004 19:55:46 +0000 Subject: Fix to bug #24, stringstream::clear() clears the stream error state not its data git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@854 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/inspircd_io.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/inspircd_io.cpp') diff --git a/src/inspircd_io.cpp b/src/inspircd_io.cpp index 405b3d046..553d73e96 100644 --- a/src/inspircd_io.cpp +++ b/src/inspircd_io.cpp @@ -121,7 +121,7 @@ bool FileExists (const char* file) bool LoadConf(const char* filename, std::stringstream *target) { - target->clear(); + target->str(""); FILE* conf = fopen(filename,"r"); if (!FileExists(filename)) { @@ -130,7 +130,6 @@ bool LoadConf(const char* filename, std::stringstream *target) char buffer[MAXBUF]; if (conf) { - target->clear(); while (!feof(conf)) { if (fgets(buffer, MAXBUF, conf)) -- cgit v1.2.3