Applied a bugfix from my local branch
This commit is contained in:
parent
0d7e69767d
commit
aed1de5ce5
1 changed files with 3 additions and 2 deletions
|
|
@ -130,7 +130,7 @@ static bool many_ctrvm(HRVMProg *prog, void *env) {
|
|||
if (repeat->min_p) {
|
||||
h_rvm_insert_insn(prog, RVM_PUSH, 0);
|
||||
assert(repeat->count < 2); // TODO: The other cases should be supported later.
|
||||
uint16_t end_fork;
|
||||
uint16_t end_fork = 0xFFFF; // Shut up GCC
|
||||
if (repeat->count == 0)
|
||||
end_fork = h_rvm_insert_insn(prog, RVM_FORK, 0xFFFF);
|
||||
uint16_t goto_mid = h_rvm_insert_insn(prog, RVM_GOTO, 0xFFFF);
|
||||
|
|
@ -145,6 +145,7 @@ static bool many_ctrvm(HRVMProg *prog, void *env) {
|
|||
if (!h_compile_regex(prog, repeat->p))
|
||||
return false;
|
||||
h_rvm_insert_insn(prog, RVM_FORK, nxt);
|
||||
if (repeat->count == 0)
|
||||
h_rvm_patch_arg(prog, end_fork, h_rvm_get_ip(prog));
|
||||
|
||||
h_rvm_insert_insn(prog, RVM_ACTION, h_rvm_create_action(prog, h_svm_action_make_sequence, NULL));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue