summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpommicket <leonardomtenenbaum@gmail.com>2016-01-15 17:28:59 -0500
committerpommicket <leonardomtenenbaum@gmail.com>2016-01-15 17:28:59 -0500
commite2a8a663bffae5df7bf31c9eea5a097419a24154 (patch)
treebc4e6ca545f54462abef65ae24569aad5f54b4fc
parent5e4ff2049b377c2a311129d84a9edfff61e9b269 (diff)
Fixed input
-rwxr-xr-xbuild/GNULinux/cookbin11168 -> 11368 bytes
-rw-r--r--source/bfcompiler.c5
2 files changed, 4 insertions, 1 deletions
diff --git a/build/GNULinux/cook b/build/GNULinux/cook
index 3e4de3e..bfa2ab3 100755
--- a/build/GNULinux/cook
+++ b/build/GNULinux/cook
Binary files differ
diff --git a/source/bfcompiler.c b/source/bfcompiler.c
index 9325faf..3fdb9ac 100644
--- a/source/bfcompiler.c
+++ b/source/bfcompiler.c
@@ -98,7 +98,7 @@ void compilebf(char* bf)
int i;
int ptr;
List* l;
-
+ char c;
size = strlen(bf);
ptr = START_SIZE / 2;
@@ -127,6 +127,9 @@ void compilebf(char* bf)
case '.':
putchar(l->array[ptr]);
break;
+ case ',':
+ scanf("%c", &c);
+ l->array[ptr] = c;
case '[':
if (!l->array[ptr])
i = right_matching(bf, i);