summaryrefslogtreecommitdiffstats
path: root/src/corelib/io
diff options
context:
space:
mode:
authorMaurice Kalinowski <maurice.kalinowski@digia.com>2014-04-01 10:27:42 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-04-01 12:29:14 +0200
commit30db2159aa54aff0c28054739e2204966c584d8c (patch)
treeceb06ced9f275dc16a97e7c6ffff8c274b765139 /src/corelib/io
parentcaf34b9f0ad66d8a1bcfaebcd33c676a0f7973cf (diff)
Fix offset calculation on WinRT
According to MSDN "the offset must be a multiple of the allocation granularity". We use this already for the win32 version by splitting into offsetLo and offsetHi. However, we did not convert it back to the correct argument passed for MapViewOfFileFromApp. Now all auto-tests for mapping succeed. Task-number: QTBUG-37773 Change-Id: I7e43f906cb93164b58f4e5e3f88388cdace865d7 Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Diffstat (limited to 'src/corelib/io')
-rw-r--r--src/corelib/io/qfsfileengine_win.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/corelib/io/qfsfileengine_win.cpp b/src/corelib/io/qfsfileengine_win.cpp
index c974daab06..afc8deb1a0 100644
--- a/src/corelib/io/qfsfileengine_win.cpp
+++ b/src/corelib/io/qfsfileengine_win.cpp
@@ -1034,6 +1034,7 @@ uchar *QFSFileEnginePrivate::map(qint64 offset, qint64 size,
LPVOID mapAddress = ::MapViewOfFile(mapHandle, access,
offsetHi, offsetLo, size + extra);
#else
+ offset = (offsetHi << 32) + offsetLo;
LPVOID mapAddress = ::MapViewOfFileFromApp(mapHandle, access, offset, size);
#endif
if (mapAddress) {