aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--brainfuck.c8
1 files 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);