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:
1 parent
e35254143e
commit
c4430cf14f
1 file changed
+1
-1
@@ -1067,7 +1067,7 @@ void editorOpen(char* file_name) {
|
|||||||
|
|
||||||
editorSelectSyntaxHighlight();
|
editorSelectSyntaxHighlight();
|
||||||
|
|
||||||
FILE* file = fopen(file_name, "a+");
|
FILE* file = fopen(file_name, "r+");
|
||||||
if (!file)
|
if (!file)
|
||||||
die("Failed to open the file");
|
die("Failed to open the file");
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user