Fix fopen() mode

Use r+ instead of a+ which makes more sense since it needs to read from
the beginning of the file.
This commit is contained in:
Aurélien Nephtali committed 2017-04-15 16:49:23 +02:00
1 parent e35254143e
commit c4430cf14f
1 file changed
+1 -1
+1 -1
View File
@@ -1067,7 +1067,7 @@ void editorOpen(char* file_name) {
editorSelectSyntaxHighlight();
FILE* file = fopen(file_name, "a+");
FILE* file = fopen(file_name, "r+");
if (!file)
die("Failed to open the file");