(svn r3875) - [Patches] Fix up the intro menu so the right values for the mapsize are shown (the default ones). Setting the value involves a small hack in that we also set the _patches value because that is used for world-generation and only inside there do the values get copied from _newgame

- [Patches] Fix a stupid, stupid bug where I used sizeof() as length instead of strlen() in getting console values for patches.
This commit is contained in:
Darkvater
2006-03-14 22:58:46 +00:00
parent 5642bbb91d
commit 19dee66a26
2 changed files with 11 additions and 7 deletions

View File

@@ -1420,7 +1420,7 @@ static const SettingDesc *GetPatchFromName(const char *name, uint *i)
const SettingDesc *sd;
for (*i = 0, sd = _patch_settings; sd->save.cmd != SL_END; sd++, (*i)++) {
if (strncmp(sd->desc.name, name, sizeof(sd->desc.name)) == 0) return sd;
if (strncmp(sd->desc.name, name, strlen(sd->desc.name)) == 0) return sd;
}
return NULL;