Update src/init.c
Build project / build (push) Has been cancelled

This commit is contained in:
2025-10-31 09:10:57 +01:00
parent 65f997e964
commit fa32f4b177
+2 -1
View File
@@ -34,7 +34,7 @@ void initBuiltins() {
} }
void initEditor() { void initEditor() {
char init_file_path[256]; char * init_file_path = (char *) calloc(256, sizeof(char));
E.cursor_x = 0; E.cursor_x = 0;
E.cursor_y = 0; E.cursor_y = 0;
E.rx = 0; E.rx = 0;
@@ -66,6 +66,7 @@ void initEditor() {
// Read config file // Read config file
E.ctx_data = lisp_read_file(E.fd_init_file, &E.ctx_error, E.ctx); E.ctx_data = lisp_read_file(E.fd_init_file, &E.ctx_error, E.ctx);
free(init_file_path);
if (E.ctx_error != LISP_ERROR_NONE) { if (E.ctx_error != LISP_ERROR_NONE) {
die("init failed"); die("init failed");
} }