forked from gavin/bc
1
0
Fork 0
Browse Source

Fix a crash

This crash was caught by the test suite. The problem was that bc was
able to execute when it shouldn't have been able to. I added a check for
that, a check that I was sure already existed, but I must have taken it
out by mistake.
master
Gavin Howard 2 years ago
parent
commit
9493e1b0ad
Signed by untrusted user who does not match committer: gavin
GPG Key ID: C08038BDF280D33E
  1. 2
      src/vm.c

2
src/vm.c

@ -464,7 +464,7 @@ static void bc_vm_process(const char *text) {
while (BC_PARSE_CAN_PARSE(vm.prs)) vm.parse(&vm.prs);
bc_program_exec(&vm.prog);
if(BC_IS_DC || !BC_PARSE_NO_EXEC(&vm.prs)) bc_program_exec(&vm.prog);
assert(BC_IS_DC || vm.prog.results.len == 0);

Loading…
Cancel
Save