From eb5b8e3d248b91eda948d93e4bc8e83e341d1191 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 24 Jun 2002 18:19:26 -0400 Subject: [PATCH] BUG: Attempt to fix ostrstream::str() wrapper for broken platforms. --- Source/cmStandardIncludes.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/cmStandardIncludes.h b/Source/cmStandardIncludes.h index fb1bdb65d..802855c09 100644 --- a/Source/cmStandardIncludes.h +++ b/Source/cmStandardIncludes.h @@ -180,8 +180,8 @@ public: { cmStrStreamCleanup cleanup(*this); cmStrStreamCleanup::IgnoreUnusedVariable(cleanup); - const char* ptr = this->Superclass::str(); - return std::string(ptr, ptr+this->pcount()); + int pcount = this->pcount(); + return std::string(this->Superclass::str(), pcount); } private: cmStringStream(const cmStringStream&);