Skip to content

Commit

Permalink
fix off-by-one
Browse files Browse the repository at this point in the history
  • Loading branch information
disruptek committed Dec 16, 2024
1 parent bd7796b commit e01d6c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/zforth/zforth.c
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ static void run(zf_ctx *ctx, const char *input)

ctx->ip += l;

if(code <= PRIM_COUNT) {
if(code < PRIM_COUNT) {
do_prim(ctx, (zf_prim)code, input);

/* If the prim requests input, restore IP so that the
Expand Down

0 comments on commit e01d6c5

Please sign in to comment.