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
8d9a7247
Commit
8d9a7247
authored
Jun 16, 2014
by
Akihiro Sagawa
Committed by
Alexandre Julliard
Jun 16, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winmm: Fix SEEK_END handling for memory files.
parent
71b8a56c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
mmio.c
dlls/winmm/mmio.c
+1
-1
mmio.c
dlls/winmm/tests/mmio.c
+10
-1
No files found.
dlls/winmm/mmio.c
View file @
8d9a7247
...
@@ -896,7 +896,7 @@ LONG WINAPI mmioSeek(HMMIO hmmio, LONG lOffset, INT iOrigin)
...
@@ -896,7 +896,7 @@ LONG WINAPI mmioSeek(HMMIO hmmio, LONG lOffset, INT iOrigin)
/* some memory mapped buffers are defined with -1 as a size */
/* some memory mapped buffers are defined with -1 as a size */
if
((
wm
->
info
.
cchBuffer
>
0
)
&&
if
((
wm
->
info
.
cchBuffer
>
0
)
&&
((
offset
<
wm
->
info
.
lBufOffset
)
||
((
offset
<
wm
->
info
.
lBufOffset
)
||
(
offset
>
=
wm
->
info
.
lBufOffset
+
wm
->
info
.
cchBuffer
)
||
(
offset
>
wm
->
info
.
lBufOffset
+
wm
->
info
.
cchBuffer
)
||
(
offset
>
wm
->
dwFileSize
&&
wm
->
info
.
fccIOProc
!=
FOURCC_MEM
)
||
(
offset
>
wm
->
dwFileSize
&&
wm
->
info
.
fccIOProc
!=
FOURCC_MEM
)
||
!
wm
->
bBufferLoaded
))
{
!
wm
->
bBufferLoaded
))
{
...
...
dlls/winmm/tests/mmio.c
View file @
8d9a7247
...
@@ -695,7 +695,16 @@ static void test_mmioSeek(void)
...
@@ -695,7 +695,16 @@ static void test_mmioSeek(void)
if
(
hmmio
!=
NULL
)
{
if
(
hmmio
!=
NULL
)
{
/* seek to the end */
/* seek to the end */
end
=
mmioSeek
(
hmmio
,
0
,
SEEK_END
);
end
=
mmioSeek
(
hmmio
,
0
,
SEEK_END
);
todo_wine
ok
(
end
==
size
,
"expected %d, got %d
\n
"
,
size
,
end
);
ok
(
end
==
size
,
"expected %d, got %d
\n
"
,
size
,
end
);
/* test MMIOINFO values */
res
=
mmioGetInfo
(
hmmio
,
&
mmio
,
0
);
ok
(
res
==
MMSYSERR_NOERROR
,
"expected 0, got %d
\n
"
,
res
);
ok
(
mmio
.
pchNext
==
mmio
.
pchBuffer
+
mmio
.
cchBuffer
,
"expected %p + %d, got %p
\n
"
,
mmio
.
pchBuffer
,
mmio
.
cchBuffer
,
mmio
.
pchNext
);
ok
(
mmio
.
pchEndRead
==
mmio
.
pchBuffer
+
mmio
.
cchBuffer
,
"expected %p + %d, got %p
\n
"
,
mmio
.
pchBuffer
,
mmio
.
cchBuffer
,
mmio
.
pchEndRead
);
ok
(
mmio
.
pchEndWrite
==
mmio
.
pchBuffer
+
mmio
.
cchBuffer
,
"expected %p + %d, got %p
\n
"
,
mmio
.
pchBuffer
,
mmio
.
cchBuffer
,
mmio
.
pchEndWrite
);
ok
(
mmio
.
lBufOffset
==
0
,
"expected %d, got %d
\n
"
,
0
,
mmio
.
lBufOffset
);
ok
(
mmio
.
lDiskOffset
==
0
,
"expected %d, got %d
\n
"
,
0
,
mmio
.
lDiskOffset
);
/* seek backward from the end */
/* seek backward from the end */
pos
=
mmioSeek
(
hmmio
,
offset
,
SEEK_END
);
pos
=
mmioSeek
(
hmmio
,
offset
,
SEEK_END
);
...
...
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