Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
51c38cc7
Commit
51c38cc7
authored
Apr 14, 2003
by
Andreas Mohr
Committed by
Alexandre Julliard
Apr 14, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix blatantly wrong SetFilePointer() calls.
parent
94c02fef
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
file.c
dlls/msvcrt/file.c
+1
-1
storage.c
dlls/ole32/storage.c
+5
-3
No files found.
dlls/msvcrt/file.c
View file @
51c38cc7
...
@@ -605,7 +605,7 @@ int _locking(int fd, int mode, LONG nbytes)
...
@@ -605,7 +605,7 @@ int _locking(int fd, int mode, LONG nbytes)
(
mode
==
_LK_NBRLCK
)
?
"_LK_NBRLCK"
:
(
mode
==
_LK_NBRLCK
)
?
"_LK_NBRLCK"
:
"UNKNOWN"
);
"UNKNOWN"
);
if
((
cur_locn
=
SetFilePointer
(
hand
,
0L
,
NULL
,
SEEK_CUR
))
==
0xffffffff
)
if
((
cur_locn
=
SetFilePointer
(
hand
,
0L
,
NULL
,
SEEK_CUR
))
==
INVALID_SET_FILE_POINTER
)
{
{
FIXME
(
"Seek failed
\n
"
);
FIXME
(
"Seek failed
\n
"
);
*
MSVCRT__errno
()
=
MSVCRT_EINVAL
;
/* FIXME */
*
MSVCRT__errno
()
=
MSVCRT_EINVAL
;
/* FIXME */
...
...
dlls/ole32/storage.c
View file @
51c38cc7
...
@@ -110,7 +110,8 @@ STORAGE_get_big_block(HANDLE hf,int n,BYTE *block)
...
@@ -110,7 +110,8 @@ STORAGE_get_big_block(HANDLE hf,int n,BYTE *block)
DWORD
result
;
DWORD
result
;
assert
(
n
>=-
1
);
assert
(
n
>=-
1
);
if
(
!
SetFilePointer
(
hf
,
(
n
+
1
)
*
BIGSIZE
,
NULL
,
SEEK_SET
))
if
((
SetFilePointer
(
hf
,
(
n
+
1
)
*
BIGSIZE
,
NULL
,
SEEK_SET
)
==
INVALID_SET_FILE_POINTER
)
&&
GetLastError
())
{
{
WARN
(
" seek failed (%ld)
\n
"
,
GetLastError
());
WARN
(
" seek failed (%ld)
\n
"
,
GetLastError
());
return
FALSE
;
return
FALSE
;
...
@@ -132,9 +133,10 @@ STORAGE_put_big_block(HANDLE hf,int n,BYTE *block)
...
@@ -132,9 +133,10 @@ STORAGE_put_big_block(HANDLE hf,int n,BYTE *block)
DWORD
result
;
DWORD
result
;
assert
(
n
>=-
1
);
assert
(
n
>=-
1
);
if
(
!
SetFilePointer
(
hf
,
(
n
+
1
)
*
BIGSIZE
,
NULL
,
SEEK_SET
))
if
((
SetFilePointer
(
hf
,
(
n
+
1
)
*
BIGSIZE
,
NULL
,
SEEK_SET
)
==
INVALID_SET_FILE_POINTER
)
&&
GetLastError
())
{
{
WARN
(
"
seek failed (%ld)
\n
"
,
GetLastError
());
WARN
(
"seek failed (%ld)
\n
"
,
GetLastError
());
return
FALSE
;
return
FALSE
;
}
}
if
(
!
WriteFile
(
hf
,
block
,
BIGSIZE
,
&
result
,
NULL
)
||
result
!=
BIGSIZE
)
if
(
!
WriteFile
(
hf
,
block
,
BIGSIZE
,
&
result
,
NULL
)
||
result
!=
BIGSIZE
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment