mirror of
https://gitea.tendokyu.moe/TeamTofuShop/capnhook.git
synced 2026-09-22 22:38:12 +03:00
Fix 32bit SetFilePointer
This commit is contained in:
+2
-2
@@ -825,12 +825,12 @@ static DWORD WINAPI iohook_SetFilePointer(
|
||||
irp.seek_origin = dwMoveMethod;
|
||||
|
||||
/* This is a clumsy API. In 32-bit mode lDistanceToMove is a signed 32-bit
|
||||
int, but in 64-bit mode it is a 32-bit UNsigned int. Care must be taken
|
||||
int, but in 64-bit mode it is a 32-bit unsigned int. Care must be taken
|
||||
with sign-extension vs zero-extension here. */
|
||||
|
||||
if (lpDistanceToMoveHigh != NULL) {
|
||||
irp.seek_offset = ((( int64_t) *lpDistanceToMoveHigh) << 32) |
|
||||
((uint64_t) lDistanceToMove ) ;
|
||||
((uint32_t) lDistanceToMove ) ;
|
||||
} else {
|
||||
irp.seek_offset = ( int64_t) lDistanceToMove;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user