From 7450280c4365723b914ce2b4b316861d0bfd3878 Mon Sep 17 00:00:00 2001 From: nova Date: Sat, 18 Oct 2025 17:06:38 +0200 Subject: [PATCH] fixed crash on move_right, used to memcpy into btm_buffer when thread_btm assumed unchanging size --- interactions.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/interactions.c b/interactions.c index 5a4d81d..548d6ef 100644 --- a/interactions.c +++ b/interactions.c @@ -236,7 +236,7 @@ void move_right(){ if (mid_content->file_name[0] == '\0') { return; } - if (mid_content[selected_file_current].file_type &= FILE_TYPE_DIR) { + if ((mid_content[selected_file_current].file_type & FILE_TYPE_DIR) == FILE_TYPE_DIR) { if (chdir(mid_content[selected_file_current].file_name) != 0) { FAIL("move_right", "unhandled error of chdir"); } else { @@ -272,9 +272,7 @@ void move_right(){ char *cmd = concat(mimetype_default_cmd[i].command, " ./\""); cmd = concat(cmd, mid_content[selected_file_current].file_name); cmd = concat(cmd, "\""); - btm_buffer = malloc(strlen(cmd)); - memcpy(btm_buffer, cmd, strlen(cmd)); if (system(cmd) == -1) {