From 4ba7d3c5549bd35bb3b25665949df7f57e67dce8 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Tue, 17 Mar 2026 21:28:50 +0000 Subject: [PATCH] bf: added notes regarding '{' and '<'. --- src/bf.c | 4 ++++ 1 file changed, 4 insertions(+) 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;