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) {