浏览代码

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

Brad King 23 年之前
父节点
当前提交
eb5b8e3d24
共有 1 个文件被更改,包括 2 次插入2 次删除
  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&);