projects
/
platform
/
upstream
/
freerdp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
80ed237
)
Fixed FileSetFilePointer warnings
author
Armin Novak
<armin.novak@thincast.com>
Thu, 10 Aug 2017 14:51:55 +0000
(16:51 +0200)
committer
Armin Novak
<armin.novak@thincast.com>
Thu, 10 Aug 2017 14:56:20 +0000
(16:56 +0200)
winpr/libwinpr/file/file.c
patch
|
blob
|
history
diff --git
a/winpr/libwinpr/file/file.c
b/winpr/libwinpr/file/file.c
index
13fe27d
..
1fcd65b
100644
(file)
--- a/
winpr/libwinpr/file/file.c
+++ b/
winpr/libwinpr/file/file.c
@@
-128,9
+128,11
@@
static DWORD FileSetFilePointer(HANDLE hFile, LONG lDistanceToMove,
if (!hFile)
return INVALID_SET_FILE_POINTER;
+ /* If there is a high part, the sign is contained in that
+ * and the low integer must be interpreted as unsigned. */
if (lpDistanceToMoveHigh)
{
- offset = (
*lpDistanceToMoveHigh << 32) | (UINT32)lDistanceToMove
;
+ offset = (
INT64)(((UINT64)*lpDistanceToMoveHigh << 32U) | (UINT64)lDistanceToMove)
;
}
else
offset = lDistanceToMove;