aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp b/tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp
index 6e6c9d7346..c6ec2eb780 100644
--- a/tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp
+++ b/tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp
@@ -371,7 +371,9 @@ void tst_qmlcachegen::versionChecksForAheadOfTimeUnits()
QUrl("qrc:/data/versionchecks.qml"), &error);
QVERIFY(originalUnit);
QV4::CompiledData::Unit *tweakedUnit = (QV4::CompiledData::Unit *)malloc(originalUnit->qmlData->unitSize);
- memcpy(reinterpret_cast<void *>(tweakedUnit), reinterpret_cast<const void *>(originalUnit), originalUnit->qmlData->unitSize);
+ memcpy(reinterpret_cast<void *>(tweakedUnit),
+ reinterpret_cast<const void *>(originalUnit->qmlData),
+ originalUnit->qmlData->unitSize);
tweakedUnit->version = QV4_DATA_STRUCTURE_VERSION - 1;
temporaryModifiedCachedUnit = new QQmlPrivate::CachedQmlUnit{tweakedUnit, nullptr, nullptr};