This commit is contained in:
Elias Bennour 2023-12-09 17:19:43 +01:00
parent 4994bd6071
commit de248a5943

View File

@ -10,7 +10,7 @@ unsigned int fromFile(char *path, struct program *program) {
unsigned int countInstructions; unsigned int countInstructions;
unsigned int staticVars; unsigned int staticVars;
FILE *fptr; FILE *fptr;
fptr = fopen(path, "r+b"); fptr = fopen(path, "r");
if (fptr == NULL) { if (fptr == NULL) {
printf("Error: cannot open code file %s\n", path); printf("Error: cannot open code file %s\n", path);
exit(EXIT_FAILURE); exit(EXIT_FAILURE);