Browse Source

BUG: Attempt to fix ostrstream::str() wrapper for broken platforms.

Brad King 23 years ago
parent
commit
eb5b8e3d24
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Source/cmStandardIncludes.h

+ 2 - 2
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&);