Skip to content

Commit 513f689

Browse files
committed
modified source code
1 parent 4c264c6 commit 513f689

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/brainfuck.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#include <stdio.h>
22
#include <string.h>
3-
#include "../headers/brainfutils.h"
43

54
/*
65
* How does brainfuck work?
@@ -19,8 +18,8 @@ int main(int argc, char *argv[]){
1918
return 1;
2019
}
2120
int pos=0, progress=0;
22-
char script[strlen(argv[2])]; strcpy(script, argv[2]);
23-
char cells[atoi()], error[200] = "Don't know what you did, but hope you are happy.\n";
21+
char script[strlen(argv[2])]; strcpy(script, argv[2]), item;
22+
char cells[100], error[200] = "Don't know what you did, but hope you are happy.\n";
2423
printf("Script: %s\n\n", script);
2524
do{
2625

@@ -41,6 +40,7 @@ int main(int argc, char *argv[]){
4140
}
4241

4342
// Read the character and perform an action based on it
43+
item=script[progress]
4444
#include "../headers/brainfutils.h"
4545
progress++;
4646
}while(1);

0 commit comments

Comments
 (0)