Fix critter lists sorting functions

This commit is contained in:
Alexander Batalov 2022-12-28 17:54:09 +03:00
parent 57dcf42b5c
commit 0e13989f9c
1 changed files with 6 additions and 6 deletions

View File

@ -1270,9 +1270,9 @@ static int _compare_nearer(const void* a1, const void* a2)
if (object1 == NULL && object2 == NULL) { if (object1 == NULL && object2 == NULL) {
return 0; return 0;
} else if (object1 != NULL) { } else if (object1 != NULL && object2 == NULL) {
return -1; return -1;
} else if (object2 != NULL) { } else if (object1 == NULL && object2 != NULL) {
return 1; return 1;
} }
@ -1307,9 +1307,9 @@ static int _compare_strength(const void* a1, const void* a2)
if (object1 == NULL && object2 == NULL) { if (object1 == NULL && object2 == NULL) {
return 0; return 0;
} else if (object1 != NULL) { } else if (object1 != NULL && object2 == NULL) {
return -1; return -1;
} else if (object2 != NULL) { } else if (object1 == NULL && object2 != NULL) {
return 1; return 1;
} }
@ -1343,9 +1343,9 @@ static int _compare_weakness(const void* a1, const void* a2)
if (object1 == NULL && object2 == NULL) { if (object1 == NULL && object2 == NULL) {
return 0; return 0;
} else if (object1 != NULL) { } else if (object1 != NULL && object2 == NULL) {
return -1; return -1;
} else if (object2 != NULL) { } else if (object1 == NULL && object2 != NULL) {
return 1; return 1;
} }