Fixed bug with reading characters from a file

master
Aadhavan Srinivasan 2 years ago
parent 25c1f6a2c1
commit 2ae0b4b1fe

@ -100,10 +100,9 @@ int main(int argc, char** argv) {
if (argc == 2) {
if (access(argv[1],F_OK) == 0) { /* If the file exists */
FILE* file = fopen(argv[1],"r");
char c;
while (c = fgetc(file) != EOF) {
while ((c = fgetc(file)) != EOF) {
buffer_insert(c,buffer);
}

Loading…
Cancel
Save