+2
-1
@@ -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");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user