aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4stringobject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/jsruntime/qv4stringobject.cpp')
-rw-r--r--src/qml/jsruntime/qv4stringobject.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4stringobject.cpp b/src/qml/jsruntime/qv4stringobject.cpp
index e4aacc3d2a..5c9f527c31 100644
--- a/src/qml/jsruntime/qv4stringobject.cpp
+++ b/src/qml/jsruntime/qv4stringobject.cpp
@@ -812,7 +812,7 @@ ReturnedValue StringPrototype::method_replace(const FunctionObject *b, const Val
if (!!searchCallback) {
result.reserve(string.size() + 10*numStringMatches);
ScopedValue entry(scope);
- Value *arguments = scope.alloc(numCaptures + 2);
+ Value *arguments = scope.constructUndefined(numCaptures + 2);
int lastEnd = 0;
for (int i = 0; i < numStringMatches; ++i) {
for (int k = 0; k < numCaptures; ++k) {