mirror of
https://gittea.dev/nova/th.git
synced 2026-01-30 16:50:10 -05:00
small changes
This commit is contained in:
3
dir.c
3
dir.c
@@ -254,7 +254,7 @@ void print_dir(WINDOW *win, char print_info, unsigned long *dir_file_count, file
|
||||
file_name[printable_size + strlen(extension)-1] = '\0';
|
||||
file_name[printable_size - 2] = '~';
|
||||
} else {
|
||||
file_name = malloc(printable_size-1);
|
||||
file_name = malloc(printable_size);
|
||||
memcpy(file_name, dir_content[i].file_name, printable_size);
|
||||
file_name[printable_size-2] = '~';
|
||||
file_name[printable_size-1] = '\0';
|
||||
@@ -323,6 +323,7 @@ void print_dir(WINDOW *win, char print_info, unsigned long *dir_file_count, file
|
||||
|
||||
char update_selected_file(){
|
||||
char ret = -1; /* -1 on empty or inaccessible file, 0 on unchanged file, 1 on changed file */
|
||||
|
||||
if (selected_file_current >= mid_file_count) {
|
||||
selected_file_current = mid_file_count-1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user