diff --git a/src/bf.c b/src/bf.c index deeef3e..e938712 100644 --- a/src/bf.c +++ b/src/bf.c @@ -105,6 +105,8 @@ void program_execute(struct ProgramConcat *prg) switch (opcode) { case '<': + // NOTE: We're doing a safe subtraction here, but maybe we should + // terminate execution if subtraction will overflow? ctx.head0 = SAFE_SUB(ctx.head0, 1); ++ctx.ip; break; @@ -113,6 +115,8 @@ void program_execute(struct ProgramConcat *prg) ++ctx.ip; break; case '{': + // NOTE: We're doing a safe subtraction here, but maybe we should + // terminate execution if subtraction will overflow? ctx.head1 = SAFE_SUB(ctx.head1, 1); ++ctx.ip; break;