aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4estable.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2018-08-26 21:38:32 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2018-08-28 21:45:57 +0000
commit2d1a50228571a82ab7a098a64ef04b4ccfe7ee15 (patch)
tree4eee70b34996bc560660e881a6a1db4d28fb91d4 /src/qml/jsruntime/qv4estable.cpp
parentf497bd50456efb7adbcb4be88c0ba2310445d166 (diff)
Fix most issues with Map.prototype.forEach
Change-Id: I730f00c6fc2a5f2275b92b09994f6e27dc6a3da4 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4estable.cpp')
-rw-r--r--src/qml/jsruntime/qv4estable.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4estable.cpp b/src/qml/jsruntime/qv4estable.cpp
index 4b0eddb989..aa39971dc6 100644
--- a/src/qml/jsruntime/qv4estable.cpp
+++ b/src/qml/jsruntime/qv4estable.cpp
@@ -157,8 +157,8 @@ bool ESTable::remove(const Value &key)
}
if (found == true) {
- memmove(m_keys + idx, m_keys + idx + 1, m_size - idx);
- memmove(m_values + idx, m_values + idx + 1, m_size - idx);
+ memmove(m_keys + idx, m_keys + idx + 1, (m_size - idx)*sizeof(Value));
+ memmove(m_values + idx, m_values + idx + 1, (m_size - idx)*sizeof(Value));
m_size--;
}
return found;