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
05d59abc
Commit
05d59abc
authored
Apr 16, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Apr 16, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Make sure to jump out of switch before entering implicit default clausule.
parent
af5c45aa
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
compile.c
dlls/jscript/compile.c
+3
-0
lang.js
dlls/jscript/tests/lang.js
+10
-0
No files found.
dlls/jscript/compile.c
View file @
05d59abc
...
...
@@ -1516,6 +1516,9 @@ static HRESULT compile_switch_statement(compiler_ctx_t *ctx, switch_statement_t
assert
(
i
==
case_cnt
);
if
(
!
have_default
)
{
hres
=
push_instr_uint
(
ctx
,
OP_jmp
,
stat_ctx
.
break_label
);
if
(
FAILED
(
hres
))
return
hres
;
instr_ptr
(
ctx
,
default_jmp
)
->
arg1
.
uint
=
ctx
->
code_off
;
if
(
!
push_instr
(
ctx
,
OP_undefined
))
return
E_OUTOFMEMORY
;
...
...
dlls/jscript/tests/lang.js
View file @
05d59abc
...
...
@@ -726,6 +726,16 @@ case 3:
ok
(
false
,
"unexpected case 3"
);
}
(
function
()
{
var
i
=
0
;
switch
(
1
)
{
case
1
:
i
++
;
}
return
i
;
})();
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