From c923497f01913d6ffa7586cafcf153c165141c60 Mon Sep 17 00:00:00 2001 From: nova Date: Sat, 30 Aug 2025 21:04:30 +0200 Subject: [PATCH] cast to unsigned char for proper sorting --- sorting.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sorting.c b/sorting.c index 1c7fb48..32f9fc8 100644 --- a/sorting.c +++ b/sorting.c @@ -28,8 +28,8 @@ int sort_natural(const void *file0_, const void *file1_){ file *file0 = (file*)file0_; file *file1 = (file*)file1_; - unsigned char *a = file0->file_name; - unsigned char *b = file1->file_name; + unsigned char *a = (unsigned char*)file0->file_name; + unsigned char *b = (unsigned char*)file1->file_name; if (file0->file_type & (FILE_TYPE_SYMLINK | FILE_TYPE_DIR) && !(file1->file_type & (FILE_TYPE_SYMLINK | FILE_TYPE_DIR))) { return -1;