fixed incorrect strcmp return value check in Sys_ListFiles

thank you Sergei
This commit is contained in:
myT 2024-07-02 04:19:42 +02:00
parent afc81437c3
commit 26ddd7e6cc

View file

@ -287,7 +287,7 @@ char **Sys_ListFiles( const char *directory, const char *extension, const char *
do {
flag = 0;
for(i=1; i<nfiles; i++) {
if ( strcmp( listCopy[i-1], listCopy[i] ) == 1 ) {
if ( strcmp( listCopy[i-1], listCopy[i] ) > 0 ) {
char *temp = listCopy[i];
listCopy[i] = listCopy[i-1];
listCopy[i-1] = temp;