From b24ea17301cd1c5fb01cce17402f7a7e727d0036 Mon Sep 17 00:00:00 2001 From: Evil Eye Date: Wed, 1 Feb 2023 16:36:37 +0100 Subject: [PATCH] Restore 0936d716d96cd45b3efc2d1a3697614f7f96952d --- components/platform/file.win32.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/platform/file.win32.cpp b/components/platform/file.win32.cpp index a2ba86a4ef..dd62f9980c 100644 --- a/components/platform/file.win32.cpp +++ b/components/platform/file.win32.cpp @@ -48,7 +48,9 @@ namespace Platform::File { const auto nativeHandle = getNativeHandle(handle); const auto nativeSeekType = getNativeSeekType(type); - if (SetFilePointer(nativeHandle, static_cast(position), nullptr, nativeSeekType) == INVALID_SET_FILE_POINTER) + LARGE_INTEGER li; + li.QuadPart = position; + if (!SetFilePointerEx(nativeHandle, li, nullptr, nativeSeekType)) { if (auto errCode = GetLastError(); errCode != ERROR_SUCCESS) {