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
ed674d63
Commit
ed674d63
authored
Oct 17, 2023
by
Gabriel Ivăncescu
Committed by
Alexandre Julliard
Oct 17, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Fix Array.reduce when last element doesn't exist.
Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
parent
40b36d42
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
array.c
dlls/jscript/array.c
+3
-1
es5.js
dlls/mshtml/tests/es5.js
+3
-0
No files found.
dlls/jscript/array.c
View file @
ed674d63
...
...
@@ -1422,8 +1422,10 @@ static HRESULT Array_reduce(script_ctx_t *ctx, jsval_t vthis, WORD flags, unsign
for
(
k
=
0
;
k
<
length
;
k
++
)
{
hres
=
jsdisp_get_idx
(
jsthis
,
k
,
&
callback_args
[
1
]);
if
(
hres
==
DISP_E_UNKNOWNNAME
)
if
(
hres
==
DISP_E_UNKNOWNNAME
)
{
hres
=
S_OK
;
continue
;
}
if
(
FAILED
(
hres
))
break
;
...
...
dlls/mshtml/tests/es5.js
View file @
ed674d63
...
...
@@ -1336,6 +1336,9 @@ sync_test("reduce", function() {
r
=
[
1
,
2
,
3
].
reduce
(
function
(
a
,
value
)
{
return
a
+
value
;
},
"str"
);
ok
(
r
===
"str123"
,
"reduce() returned "
+
r
);
r
=
[
1
,
2
,].
reduce
(
function
(
a
,
value
)
{
return
a
+
value
;
},
"str"
);
ok
(
r
===
"str12"
,
"reduce() returned "
+
r
);
array
=
[
1
,
2
,
3
];
r
=
array
.
reduce
(
function
(
a
,
value
,
index
,
src
)
{
ok
(
src
===
array
,
"src != array"
);
...
...
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