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
8de35a45
Commit
8de35a45
authored
Jul 03, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 09, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscript: Fixed 'exit do' statements crossing for in loops.
parent
b675164b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
5 deletions
+16
-5
compile.c
dlls/vbscript/compile.c
+6
-3
interp.c
dlls/vbscript/interp.c
+4
-2
lang.vbs
dlls/vbscript/tests/lang.vbs
+6
-0
No files found.
dlls/vbscript/compile.c
View file @
8de35a45
...
...
@@ -682,7 +682,7 @@ static HRESULT compile_foreach_statement(compile_ctx_t *ctx, foreach_statement_t
static
HRESULT
compile_forto_statement
(
compile_ctx_t
*
ctx
,
forto_statement_t
*
stat
)
{
statement_ctx_t
loop_ctx
=
{
0
};
statement_ctx_t
loop_ctx
=
{
2
};
unsigned
step_instr
,
instr
;
BSTR
identifier
;
HRESULT
hres
;
...
...
@@ -743,9 +743,12 @@ static HRESULT compile_forto_statement(compile_ctx_t *ctx, forto_statement_t *st
if
(
FAILED
(
hres
))
return
hres
;
label_set_addr
(
ctx
,
loop_ctx
.
for_end_label
);
hres
=
push_instr_uint
(
ctx
,
OP_pop
,
2
);
if
(
FAILED
(
hres
))
return
hres
;
return
push_instr_uint
(
ctx
,
OP_pop
,
2
);
label_set_addr
(
ctx
,
loop_ctx
.
for_end_label
);
return
S_OK
;
}
static
HRESULT
compile_assignment
(
compile_ctx_t
*
ctx
,
member_expression_t
*
member_expr
,
expression_t
*
value_expr
,
BOOL
is_set
)
...
...
dlls/vbscript/interp.c
View file @
8de35a45
...
...
@@ -894,10 +894,12 @@ static HRESULT interp_step(exec_ctx_t *ctx)
if
(
FAILED
(
hres
))
return
hres
;
if
(
hres
==
VARCMP_EQ
||
hres
==
(
gteq_zero
?
VARCMP_LT
:
VARCMP_GT
))
if
(
hres
==
VARCMP_EQ
||
hres
==
(
gteq_zero
?
VARCMP_LT
:
VARCMP_GT
))
{
ctx
->
instr
++
;
else
}
else
{
stack_popn
(
ctx
,
2
);
instr_jmp
(
ctx
,
ctx
->
instr
->
arg1
.
uint
);
}
return
S_OK
;
}
...
...
dlls/vbscript/tests/lang.vbs
View file @
8de35a45
...
...
@@ -415,6 +415,12 @@ for x = 1 to 100
Call
ok
(
false
,
"exit for not escaped the loop?"
)
next
do
while
true
for
x
=
1
to
100
exit
do
next
loop
Call
collectionObj
.
reset
()
y
=
0
x
=
10
...
...
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