Fixed bug #646385: Custom Single Player .cm Crash
This commit is contained in:
parent
c3316e3536
commit
34e1826e6f
2 changed files with 15 additions and 8 deletions
|
@ -994,6 +994,7 @@
|
|||
<LI>Fixed bug #618086: bugs when without network (from Nehal Mistry).
|
||||
<LI>Can specify port when entering IP Address in format:
|
||||
"x.x.x.x:port" (from Nehal Mistry).
|
||||
<LI>Fixed bug #646385: Custom Single Player .cm Crash (from Jimmy Salmon).
|
||||
<LI>+++
|
||||
</UL>
|
||||
</UL>
|
||||
|
|
|
@ -2400,15 +2400,21 @@ local void ScenSelectMenu(void)
|
|||
GetInfoFromSelectPath();
|
||||
|
||||
menu = FindMenu("menu-custom-game");
|
||||
for (n = j = 0; j < PlayerMax; j++) {
|
||||
t = ScenSelectPudInfo->PlayerType[j];
|
||||
if (t == PlayerPerson || t == PlayerComputer) {
|
||||
n++;
|
||||
}
|
||||
}
|
||||
menu->items[12].d.pulldown.noptions = n;
|
||||
if (menu->items[12].d.pulldown.curopt >= n) {
|
||||
// FIXME: This check is only needed until GetCmInfo works
|
||||
if (!ScenSelectPudInfo) {
|
||||
menu->items[12].d.pulldown.noptions = PlayerMax-1;
|
||||
menu->items[12].d.pulldown.curopt = 0;
|
||||
} else {
|
||||
for (n = j = 0; j < PlayerMax; ++j) {
|
||||
t = ScenSelectPudInfo->PlayerType[j];
|
||||
if (t == PlayerPerson || t == PlayerComputer) {
|
||||
n++;
|
||||
}
|
||||
}
|
||||
menu->items[12].d.pulldown.noptions = n;
|
||||
if (menu->items[12].d.pulldown.curopt >= n) {
|
||||
menu->items[12].d.pulldown.curopt = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue