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
a5c621d4
Commit
a5c621d4
authored
Nov 16, 2012
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Nov 16, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
krnl386.exe16: Use FIELD_OFFSET for the size of structs with varlength arrays.
parent
0b02d25f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
atom.c
dlls/krnl386.exe16/atom.c
+1
-1
task.c
dlls/krnl386.exe16/task.c
+1
-1
No files found.
dlls/krnl386.exe16/atom.c
View file @
a5c621d4
...
...
@@ -163,7 +163,7 @@ WORD WINAPI InitAtomTable16( WORD entries )
/* Allocate the table */
if
(
!
entries
)
entries
=
DEFAULT_ATOMTABLE_SIZE
;
/* sanity check */
handle
=
LocalAlloc16
(
LMEM_FIXED
,
sizeof
(
ATOMTABLE
)
+
(
entries
-
1
)
*
sizeof
(
HANDLE16
)
);
handle
=
LocalAlloc16
(
LMEM_FIXED
,
FIELD_OFFSET
(
ATOMTABLE
,
entries
[
entries
]
)
);
if
(
!
handle
)
return
0
;
table
=
MapSL
(
MAKESEGPTR
(
CURRENT_DS
,
handle
)
);
table
->
size
=
entries
;
...
...
dlls/krnl386.exe16/task.c
View file @
a5c621d4
...
...
@@ -200,7 +200,7 @@ static SEGPTR TASK_AllocThunk(void)
sel
=
pThunk
->
next
;
if
(
!
sel
)
/* Allocate a new segment */
{
sel
=
GLOBAL_Alloc
(
GMEM_FIXED
,
sizeof
(
THUNKS
)
+
(
MIN_THUNKS
-
1
)
*
8
,
sel
=
GLOBAL_Alloc
(
GMEM_FIXED
,
FIELD_OFFSET
(
THUNKS
,
thunks
[
MIN_THUNKS
]
)
,
pTask
->
hPDB
,
WINE_LDT_FLAGS_CODE
);
if
(
!
sel
)
return
0
;
TASK_CreateThunks
(
sel
,
0
,
MIN_THUNKS
);
...
...
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