From: Holger Schemel Date: Fri, 5 Feb 2021 16:40:20 +0000 (+0100) Subject: improved comparing tree name strings when sorting tree X-Git-Tag: 4.2.3.0~22 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=ac90a37dbfe706bbfc4b21eb581b21067d81a6eb;p=rocksndiamonds.git improved comparing tree name strings when sorting tree --- diff --git a/src/libgame/setup.c b/src/libgame/setup.c index e223a0b8..af90c247 100644 --- a/src/libgame/setup.c +++ b/src/libgame/setup.c @@ -2878,15 +2878,7 @@ static int compareTreeInfoEntries(const void *object1, const void *object2) if (entry1->parent_link || entry2->parent_link) compare_result = (entry1->parent_link ? -1 : +1); else if (entry1->sort_priority == entry2->sort_priority) - { - char *name1 = getStringToLower(entry1->name_sorting); - char *name2 = getStringToLower(entry2->name_sorting); - - compare_result = strcmp(name1, name2); - - free(name1); - free(name2); - } + compare_result = strcasecmp(entry1->name_sorting, entry2->name_sorting); else if (class_sorting1 == class_sorting2) compare_result = entry1->sort_priority - entry2->sort_priority; else