diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2004-09-04 19:55:46 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2004-09-04 19:55:46 +0000 |
commit | ea36f2bb1b8b1bf03b8615672866f93697caff75 (patch) | |
tree | becfebab89c90c0a96b65c50e7a8a94cc40fc9fe /src/inspircd_io.cpp | |
parent | a1561f0d2d07ad7a54bf72986eb8dfae8759ca10 (diff) |
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
Diffstat (limited to 'src/inspircd_io.cpp')
-rw-r--r-- | src/inspircd_io.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
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)) |