Fixed bug where runtime would not start program at the right place

In vm_execute_all set the program pointer to the start address in the
header of the program payload.
This commit is contained in:
2023-11-03 21:21:17 +00:00
parent fc5393b010
commit 96a83db92b

View File

@@ -272,6 +272,8 @@ err_t vm_execute_all(vm_t *vm)
{
struct Program *program = &vm->program;
err_t err = ERR_OK;
// Setup the initial address according to the program
program->ptr = program->data->header.start_address;
#if VERBOSE >= 1
size_t cycles = 0;
#endif