aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2022-11-21 15:03:31 +0200
committerIgor Pashev <pashev.igor@gmail.com>2022-11-21 15:03:31 +0200
commitbb63415c8448209dd5522cc0e4b79861499395f6 (patch)
treeae560b66f9b9b4d32f2fffc2c9721fed77445d47
parentb5783dacf216af9bb70ad2eab95d555277e204a1 (diff)
downloadbrainfuck-master.tar.gz
Fix commentsHEADmaster
-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);