From 5e1444cf36944703095efa20a13895e30146641d Mon Sep 17 00:00:00 2001 From: sloum Date: Fri, 31 Jan 2020 19:28:53 -0800 Subject: [PATCH] Adds call to fseek on file open to provide better crossplatform compatibility --- hermes.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hermes.c b/hermes.c index ae107e8..0f11751 100644 --- a/hermes.c +++ b/hermes.c @@ -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;