aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/VMCore/Constants.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VMCore/Constants.cpp b/lib/VMCore/Constants.cpp
index 39c0a8c701..b9976a7207 100644
--- a/lib/VMCore/Constants.cpp
+++ b/lib/VMCore/Constants.cpp
@@ -1380,7 +1380,7 @@ std::string ConstantArray::getAsString() const {
std::string Result;
Result.reserve(getNumOperands());
for (unsigned i = 0, e = getNumOperands(); i != e; ++i)
- Result[i] = (char)cast<ConstantInt>(getOperand(i))->getZExtValue();
+ Result.push_back((char)cast<ConstantInt>(getOperand(i))->getZExtValue());
return Result;
}