summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmStandardIncludes.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmStandardIncludes.h b/Source/cmStandardIncludes.h
index fb1bdb6..802855c 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&);