Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
d64ee9ff
Commit
d64ee9ff
authored
May 26, 2010
by
Vincent Povirk
Committed by
Alexandre Julliard
May 27, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Fix seeking backwards in hglobalstream.
parent
ff4292c2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
10 deletions
+13
-10
hglobalstream.c
dlls/ole32/hglobalstream.c
+11
-8
hglobalstream.c
dlls/ole32/tests/hglobalstream.c
+2
-2
No files found.
dlls/ole32/hglobalstream.c
View file @
d64ee9ff
...
...
@@ -371,12 +371,6 @@ static HRESULT WINAPI HGLOBALStreamImpl_Seek(
TRACE
(
"(%p, %x%08x, %d, %p)
\n
"
,
iface
,
dlibMove
.
u
.
HighPart
,
dlibMove
.
u
.
LowPart
,
dwOrigin
,
plibNewPosition
);
if
(
dlibMove
.
u
.
LowPart
>=
0x80000000
)
{
hr
=
STG_E_SEEKERROR
;
goto
end
;
}
/*
* The file pointer is moved depending on the given "function"
* parameter.
...
...
@@ -405,10 +399,19 @@ static HRESULT WINAPI HGLOBALStreamImpl_Seek(
newPosition
.
u
.
HighPart
=
0
;
newPosition
.
u
.
LowPart
+=
dlibMove
.
QuadPart
;
end:
if
(
plibNewPosition
)
*
plibNewPosition
=
newPosition
;
if
(
dlibMove
.
u
.
LowPart
>=
0x80000000
&&
newPosition
.
u
.
LowPart
>=
dlibMove
.
u
.
LowPart
)
{
/* We tried to seek backwards and went past the start. */
hr
=
STG_E_SEEKERROR
;
goto
end
;
}
This
->
currentPosition
=
newPosition
;
end:
if
(
plibNewPosition
)
*
plibNewPosition
=
This
->
currentPosition
;
return
hr
;
}
...
...
dlls/ole32/tests/hglobalstream.c
View file @
d64ee9ff
...
...
@@ -177,8 +177,8 @@ static void test_streamonhglobal(IStream *pStream)
ll
.
u
.
HighPart
=
0
;
ll
.
u
.
LowPart
=
-
sizeof
(
data
);
hr
=
IStream_Seek
(
pStream
,
ll
,
STREAM_SEEK_CUR
,
&
ull
);
todo_wine
ok_ole_success
(
hr
,
"IStream_Seek"
);
todo_wine
ok
(
ull
.
u
.
LowPart
==
0
,
"LowPart set to %d
\n
"
,
ull
.
u
.
LowPart
);
ok_ole_success
(
hr
,
"IStream_Seek"
);
ok
(
ull
.
u
.
LowPart
==
0
,
"LowPart set to %d
\n
"
,
ull
.
u
.
LowPart
);
ok
(
ull
.
u
.
HighPart
==
0
,
"should have set HighPart to 0 instead of %d
\n
"
,
ull
.
u
.
HighPart
);
/* IStream_Seek -- invalid LowPart value (seek to start of stream-1) */
...
...
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