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
96cbc45a
Commit
96cbc45a
authored
Oct 19, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 20, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Return array length in Array.unshift for invoke version >= 2.
parent
a1ac9d66
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
8 deletions
+13
-8
array.c
dlls/jscript/array.c
+13
-8
No files found.
dlls/jscript/array.c
View file @
96cbc45a
...
...
@@ -967,12 +967,7 @@ static HRESULT Array_unshift(script_ctx_t *ctx, vdisp_t *vthis, WORD flags, DISP
return
hres
;
argc
=
arg_cnt
(
dp
);
if
(
!
argc
)
{
if
(
retv
)
V_VT
(
retv
)
=
VT_EMPTY
;
return
S_OK
;
}
if
(
argc
)
{
buf_end
=
buf
+
sizeof
(
buf
)
/
sizeof
(
WCHAR
)
-
1
;
*
buf_end
--
=
0
;
i
=
length
;
...
...
@@ -991,6 +986,7 @@ static HRESULT Array_unshift(script_ctx_t *ctx, vdisp_t *vthis, WORD flags, DISP
}
else
if
(
hres
==
DISP_E_UNKNOWNNAME
)
{
hres
=
IDispatchEx_DeleteMemberByDispID
(
vthis
->
u
.
dispex
,
id
);
}
}
if
(
FAILED
(
hres
))
return
hres
;
...
...
@@ -1002,12 +998,21 @@ static HRESULT Array_unshift(script_ctx_t *ctx, vdisp_t *vthis, WORD flags, DISP
return
hres
;
}
hres
=
set_length
(
jsthis
,
ei
,
length
+
argc
);
if
(
argc
)
{
length
+=
argc
;
hres
=
set_length
(
jsthis
,
ei
,
length
);
if
(
FAILED
(
hres
))
return
hres
;
}
if
(
retv
)
if
(
retv
)
{
if
(
ctx
->
version
<
2
)
{
V_VT
(
retv
)
=
VT_EMPTY
;
}
else
{
V_VT
(
retv
)
=
VT_I4
;
V_I4
(
retv
)
=
length
;
}
}
return
S_OK
;
}
...
...
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