SCP: Defer substitution for IF/ASSERT command action commands
This commit is contained in:
parent
c294787aed
commit
5f2c7b2a48
1 changed files with 4 additions and 0 deletions
4
scp.c
4
scp.c
|
@ -4056,6 +4056,8 @@ else {
|
||||||
if (*cptr == '(') {
|
if (*cptr == '(') {
|
||||||
t_svalue value;
|
t_svalue value;
|
||||||
|
|
||||||
|
if ((cptr > sim_sub_instr_buf) && ((size_t)(cptr - sim_sub_instr_buf) < sim_sub_instr_size))
|
||||||
|
cptr = &sim_sub_instr[sim_sub_instr_off[cptr - sim_sub_instr_buf]]; /* get un-substituted string */
|
||||||
cptr = sim_eval_expression (cptr, &value, TRUE, &r);
|
cptr = sim_eval_expression (cptr, &value, TRUE, &r);
|
||||||
result = (value != 0);
|
result = (value != 0);
|
||||||
}
|
}
|
||||||
|
@ -4116,6 +4118,8 @@ else {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ((cptr > sim_sub_instr_buf) && ((size_t)(cptr - sim_sub_instr_buf) < sim_sub_instr_size))
|
||||||
|
cptr = &sim_sub_instr[sim_sub_instr_off[cptr - sim_sub_instr_buf]]; /* get un-substituted string */
|
||||||
if (Not ^ result) {
|
if (Not ^ result) {
|
||||||
if (!flag)
|
if (!flag)
|
||||||
sim_brk_setact (cptr); /* set up IF actions */
|
sim_brk_setact (cptr); /* set up IF actions */
|
||||||
|
|
Loading…
Add table
Reference in a new issue