Adds call to fseek on file open to provide better crossplatform compatibility

This commit is contained in:
sloum 2020-01-31 19:28:53 -08:00
parent 39f37d7ffd
commit 5e1444cf36
1 changed files with 1 additions and 0 deletions

View File

@ -576,6 +576,7 @@ void editorOpen(char *filepath) {
FILE *fp = fopen(filepath, "a+");
if (!fp) die("Open file");
fseek(fp, 0, SEEK_SET);
char *line = NULL;
size_t linecap = 0;