Forráskód Böngészése

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

Brad King 23 éve
szülő
commit
eb5b8e3d24
1 módosított fájl, 2 hozzáadás és 2 törlés
  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&);