From a506b65bdd589997195e3f93222c37a539a29a28 Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Tue, 14 Feb 2023 14:35:29 -0500 Subject: allow byte indexing --- executor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'executor.cpp') diff --git a/executor.cpp b/executor.cpp index 30d43fc..0309ca7 100644 --- a/executor.cpp +++ b/executor.cpp @@ -22,10 +22,10 @@ int Executor::fullexec(State& state, Addr addr) { state.pushr(0); - state.ip = addr - 1; + state.ip = addr - sizeof(Cell); do { - ++state.ip; + state.ip += sizeof(Cell); CoreWords::run(state.dict.read(state.ip), state); } while (state.ip); -- cgit v1.2.3