aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4string.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2016-12-21 07:09:03 +0100
committerLars Knoll <lars.knoll@qt.io>2017-01-22 11:50:32 +0000
commit2f16dd7b1415995109bc44b925cf860236977776 (patch)
tree9024bf72aa5dc397f81d7169353c14e1041641ea /src/qml/jsruntime/qv4string.cpp
parentce736406cde2edc2315ed58c27f6cd6482bedc65 (diff)
Add some asserts to help debugging
Change-Id: I49419e45ee2686e6e8646c49b839b4d77f2e05fd Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4string.cpp')
-rw-r--r--src/qml/jsruntime/qv4string.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4string.cpp b/src/qml/jsruntime/qv4string.cpp
index 1efd8cb714..9494142fa5 100644
--- a/src/qml/jsruntime/qv4string.cpp
+++ b/src/qml/jsruntime/qv4string.cpp
@@ -102,6 +102,7 @@ void Heap::String::init(MemoryManager *mm, String *l, String *r)
stringHash = UINT_MAX;
largestSubLength = qMax(l->largestSubLength, r->largestSubLength);
len = l->len + r->len;
+ Q_ASSERT(largestSubLength <= len);
if (!l->largestSubLength && l->len > largestSubLength)
largestSubLength = l->len;