diff --git a/hook/iohook.c b/hook/iohook.c index 3284173..04bf340 100644 --- a/hook/iohook.c +++ b/hook/iohook.c @@ -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; }