From d6b71078da1bf75ab3031bae5c2952a6f0bd9d45 Mon Sep 17 00:00:00 2001 From: Zach Mullen Date: Thu, 3 Jun 2010 13:52:48 -0400 Subject: [PATCH] Fix subscript out of range crash --- Source/CTest/cmCTestSubmitHandler.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx index fe00a8236..9bbb2e694 100644 --- a/Source/CTest/cmCTestSubmitHandler.cxx +++ b/Source/CTest/cmCTestSubmitHandler.cxx @@ -61,7 +61,10 @@ private: std::string GetCurrentValue() { std::string val; - val.assign(&this->CurrentValue[0], this->CurrentValue.size()); + if(this->CurrentValue.size()) + { + val.assign(&this->CurrentValue[0], this->CurrentValue.size()); + } return val; }