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
18ee50e5
Commit
18ee50e5
authored
Feb 25, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
Feb 25, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Fixed handling block_cnt in jsheap_alloc.
parent
a2ca4812
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
jsutils.c
dlls/jscript/jsutils.c
+8
-8
No files found.
dlls/jscript/jsutils.c
View file @
18ee50e5
...
...
@@ -83,25 +83,25 @@ void *jsheap_alloc(jsheap_t *heap, DWORD size)
heap
->
block_cnt
=
1
;
}
if
(
heap
->
offset
+
size
<
block_size
(
heap
->
last_block
))
{
if
(
heap
->
offset
+
size
<
=
block_size
(
heap
->
last_block
))
{
tmp
=
((
BYTE
*
)
heap
->
blocks
[
heap
->
last_block
])
+
heap
->
offset
;
heap
->
offset
+=
size
;
return
tmp
;
}
if
(
size
<
block_size
(
heap
->
last_block
+
1
))
{
if
(
size
<
=
block_size
(
heap
->
last_block
+
1
))
{
if
(
heap
->
last_block
+
1
==
heap
->
block_cnt
)
{
tmp
=
heap_realloc
(
heap
->
blocks
,
(
heap
->
block_cnt
+
1
)
*
sizeof
(
void
*
));
if
(
!
tmp
)
return
NULL
;
heap
->
blocks
=
tmp
;
}
tmp
=
heap_alloc
(
block_size
(
heap
->
block_cnt
+
1
));
if
(
!
tmp
)
return
NULL
;
heap
->
blocks
=
tmp
;
heap
->
blocks
[
heap
->
block_cnt
]
=
heap_alloc
(
block_size
(
heap
->
block_cnt
));
if
(
!
heap
->
blocks
[
heap
->
block_cnt
])
return
NULL
;
heap
->
blocks
[
heap
->
block_cnt
++
]
=
tmp
;
heap
->
block_cnt
++
;
}
heap
->
last_block
++
;
heap
->
offset
=
size
;
...
...
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