From f063862950bfa3c5a30f9e6101bd2d74b359b6c0 Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 26 Feb 2006 21:55:04 +0000 Subject: Valgrind fixes git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3353 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/inspircd_io.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/inspircd_io.cpp') diff --git a/src/inspircd_io.cpp b/src/inspircd_io.cpp index 5e5234635..10eeca525 100644 --- a/src/inspircd_io.cpp +++ b/src/inspircd_io.cpp @@ -881,9 +881,10 @@ int ServerConfig::EnumConf(std::stringstream *config, const char* tag) char buffer[MAXBUF], c_tag[MAXBUF], c, lastc; int in_token, in_quotes, tptr, idx = 0; - const char* buf = config->str().c_str(); + std::string x = config->str(); + const char* buf = x.c_str(); long bptr = 0; - long len = strlen(buf); + long len = config->str().length(); ptr = 0; in_token = 0; @@ -1050,7 +1051,8 @@ int ServerConfig::ReadConf(std::stringstream *config, const char* tag, const cha int in_token, in_quotes, tptr, idx = 0; char* key; - const char* buf = config->str().c_str(); + std::string x = config->str(); + const char* buf = x.c_str(); long bptr = 0; long len = config->str().length(); -- cgit v1.3.1-10-gc9f91