mirror of
https://git.code.sf.net/p/quake/newtree
synced 2024-11-14 16:40:47 +00:00
fix a bug where maplist would seg on an empty map. d'oh :/
This commit is contained in:
parent
f933bbcc32
commit
ef28d1b19f
1 changed files with 9 additions and 6 deletions
|
@ -310,15 +310,18 @@ maplist_print(struct maplist *maplist)
|
||||||
char *end;
|
char *end;
|
||||||
char *name;
|
char *name;
|
||||||
|
|
||||||
qsort(maplist->list, maplist->count, sizeof(char *), maplist_cmp);
|
if (maplist->count) {
|
||||||
for (i=0; i<maplist->count - 1; i++) {
|
qsort(maplist->list, maplist->count, sizeof(char *), maplist_cmp);
|
||||||
|
for (i=0; i<maplist->count - 1; i++) {
|
||||||
|
name = maplist->list[i];
|
||||||
|
end = strstr (name, ".bsp");
|
||||||
|
Con_Printf ("%-8.*s%c", end - name, name,
|
||||||
|
((i + 1) % 4) ? ' ' : '\n');
|
||||||
|
}
|
||||||
name = maplist->list[i];
|
name = maplist->list[i];
|
||||||
end = strstr (name, ".bsp");
|
end = strstr (name, ".bsp");
|
||||||
Con_Printf ("%-8.*s%c", end - name, name, ((i + 1) % 4) ? ' ' : '\n');
|
Con_Printf ("%-9.*s\n", end - name, name);
|
||||||
}
|
}
|
||||||
name = maplist->list[i];
|
|
||||||
end = strstr (name, ".bsp");
|
|
||||||
Con_Printf ("%-9.*s\n", end - name, name);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in a new issue