mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-02-09 01:01:07 +00:00
host_cmd.c (ExtraMaps_Add): Fix the list sorting.
(Modlist_Add): Likewise. git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@90 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
b15b30ec6f
commit
4a68c9c35e
1 changed files with 4 additions and 4 deletions
|
@ -231,7 +231,7 @@ void ExtraMaps_Add (char *name)
|
|||
strcpy (level->name, name);
|
||||
|
||||
//insert each entry in alphabetical order
|
||||
if (extralevels == NULL || Q_strcasecmp(level->name, extralevels->name) > 0) //insert at front
|
||||
if (extralevels == NULL || Q_strcasecmp(level->name, extralevels->name) < 0) //insert at front
|
||||
{
|
||||
level->next = extralevels;
|
||||
extralevels = level;
|
||||
|
@ -240,7 +240,7 @@ void ExtraMaps_Add (char *name)
|
|||
{
|
||||
prev = extralevels;
|
||||
cursor = extralevels->next;
|
||||
while (cursor && (Q_strcasecmp(level->name, cursor->name) < 0))
|
||||
while (cursor && (Q_strcasecmp(level->name, cursor->name) > 0))
|
||||
{
|
||||
prev = cursor;
|
||||
cursor = cursor->next;
|
||||
|
@ -363,7 +363,7 @@ void Modlist_Add (char *name)
|
|||
strcpy (mod->name, name);
|
||||
|
||||
//insert each entry in alphabetical order
|
||||
if (modlist == NULL || Q_strcasecmp(mod->name, modlist->name) > 0) //insert at front
|
||||
if (modlist == NULL || Q_strcasecmp(mod->name, modlist->name) < 0) //insert at front
|
||||
{
|
||||
mod->next = modlist;
|
||||
modlist = mod;
|
||||
|
@ -372,7 +372,7 @@ void Modlist_Add (char *name)
|
|||
{
|
||||
prev = modlist;
|
||||
cursor = modlist->next;
|
||||
while (cursor && (Q_strcasecmp(mod->name, cursor->name) < 0))
|
||||
while (cursor && (Q_strcasecmp(mod->name, cursor->name) > 0))
|
||||
{
|
||||
prev = cursor;
|
||||
cursor = cursor->next;
|
||||
|
|
Loading…
Reference in a new issue