From 30db2159aa54aff0c28054739e2204966c584d8c Mon Sep 17 00:00:00 2001 From: Maurice Kalinowski Date: Tue, 1 Apr 2014 10:27:42 +0200 Subject: 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 --- src/corelib/io/qfsfileengine_win.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/corelib/io') 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) { -- cgit v1.2.3