From bb63415c8448209dd5522cc0e4b79861499395f6 Mon Sep 17 00:00:00 2001 From: Igor Pashev Date: Mon, 21 Nov 2022 15:03:31 +0200 Subject: Fix comments --- brainfuck.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/brainfuck.c b/brainfuck.c index 6279668..ef056ae 100644 --- a/brainfuck.c +++ b/brainfuck.c @@ -246,14 +246,14 @@ run_code () data[dp] = 0; ++cp; break; - case 'I': /* I23 -> add 22 to the current cell */ + case 'I': /* I23 -> add 23 to the current cell */ ++cp; sscanf (&(code[cp]), "%u", &d); (data[dp]) += (DATATYPE) d; while (code[cp] >= '0' && code[cp] <= '9') ++cp; /* skip digits */ break; - case 'D': /* D23 -> subtract 22 from the current cell */ + case 'D': /* D23 -> subtract 23 from the current cell */ ++cp; sscanf (&(code[cp]), "%u", &d); (data[dp]) -= (DATATYPE) d; @@ -444,14 +444,14 @@ bf2c () printf ("}\n"); ++cp; break; - case 'I': /* I23 -> add 22 to the current cell */ + case 'I': /* I23 -> add 23 to the current cell */ ++cp; sscanf (&(code[cp]), "%u", &d); printf ("data[dp] += %u;\n", d); while (code[cp] >= '0' && code[cp] <= '9') ++cp; /* skip digits */ break; - case 'D': /* D23 -> subtract 22 from the current cell */ + case 'D': /* D23 -> subtract 23 from the current cell */ ++cp; sscanf (&(code[cp]), "%u", &d); printf ("data[dp] -= %u;\n", d); -- cgit v1.2.3