1
0
mirror of https://gittea.dev/nova/th.git synced 2025-10-21 10:20:15 -04:00

cast to unsigned char for proper sorting

This commit is contained in:
nova
2025-08-30 21:04:30 +02:00
parent 69f9a609e5
commit c923497f01

View File

@@ -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;