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
353553e0
Commit
353553e0
authored
Apr 02, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Apr 02, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Emit undefined statement return for switch without default clausule.
parent
e1a72011
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
compile.c
dlls/jscript/compile.c
+4
-1
lang.js
dlls/jscript/tests/lang.js
+7
-0
No files found.
dlls/jscript/compile.c
View file @
353553e0
...
...
@@ -1515,8 +1515,11 @@ static HRESULT compile_switch_statement(compiler_ctx_t *ctx, switch_statement_t
return
hres
;
assert
(
i
==
case_cnt
);
if
(
!
have_default
)
if
(
!
have_default
)
{
instr_ptr
(
ctx
,
default_jmp
)
->
arg1
.
uint
=
ctx
->
code_off
;
if
(
!
push_instr
(
ctx
,
OP_undefined
))
return
E_OUTOFMEMORY
;
}
label_set_addr
(
ctx
,
stat_ctx
.
break_label
);
return
S_OK
;
...
...
dlls/jscript/tests/lang.js
View file @
353553e0
...
...
@@ -719,6 +719,13 @@ case false:
}
ok
(
state
===
"default"
,
"state = "
+
state
);
switch
(
1
)
{
case
2
:
ok
(
false
,
"unexpected case 2"
);
case
3
:
ok
(
false
,
"unexpected case 3"
);
}
tmp
=
eval
(
"1"
);
ok
(
tmp
===
1
,
"eval(
\"
1
\"
) !== 1"
);
eval
(
"{ ok(tmp === 1, 'eval: tmp !== 1'); } tmp = 2;"
);
...
...
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