fixed sorting by extension
This commit is contained in:
1 parent
62515e8a1b
commit
9b662f17bb
1 file changed
+1
-6
+1
-6
@@ -174,14 +174,9 @@ int compare_extension(
|
||||
const void* operand_b
|
||||
)
|
||||
{
|
||||
if ( !operand_a || !operand_b )
|
||||
{
|
||||
log_error( "invalid parameter to compare function" );
|
||||
exit( -EINVAL );
|
||||
}
|
||||
|
||||
directory_entry_t* a = *( directory_entry_t** )operand_a;
|
||||
directory_entry_t* b = *( directory_entry_t** )operand_b;
|
||||
|
||||
if ( !a->extension && !b->extension ) return 0;
|
||||
if ( !a->extension && b->extension ) return -1;
|
||||
if ( a->extension && !b->extension ) return 1;
|
||||
|
||||
Reference in new issue
Block a user