aboutsummaryrefslogtreecommitdiff
path: root/vm/runtime.c
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2023-11-03 19:10:01 +0000
committerAryadev Chavali <aryadev@aryadevchavali.com>2023-11-03 21:15:30 +0000
commit92f4f9011d431f9c197aff56a3dbb8a3963b4197 (patch)
tree8c9300348587c374132f2bf4b987e98a467972e9 /vm/runtime.c
parenta7588ccc6166d1fa49a37db6d2d3aba552901e9e (diff)
downloadovm-92f4f9011d431f9c197aff56a3dbb8a3963b4197.tar.gz
ovm-92f4f9011d431f9c197aff56a3dbb8a3963b4197.tar.bz2
ovm-92f4f9011d431f9c197aff56a3dbb8a3963b4197.zip
Refactor vm/main to use refactor to program structure
Diffstat (limited to 'vm/runtime.c')
-rw-r--r--vm/runtime.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vm/runtime.c b/vm/runtime.c
index 16c75f9..72785c5 100644
--- a/vm/runtime.c
+++ b/vm/runtime.c
@@ -281,8 +281,8 @@ err_t vm_execute_all(vm_t *vm)
size_t prev_pages = 0;
size_t prev_cptr = 0;
#endif
- while (program->data->instructions[program->ptr].opcode != OP_HALT &&
- program->ptr < program->data->count)
+ while (program->ptr < program->data->count &&
+ program->data->instructions[program->ptr].opcode != OP_HALT)
{
#if VERBOSE >= 2
fprintf(stdout, "[vm_execute_all]: Trace(Cycle %lu)\n", cycles);