summaryrefslogtreecommitdiff
path: root/settings.c
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2006-03-14 22:58:46 +0000
committerDarkvater <darkvater@openttd.org>2006-03-14 22:58:46 +0000
commitcd1dea52ca171f623dc3d92ed39ab2347a1f2023 (patch)
treea357bc84be50899e5f36c9583ecdb605b1288904 /settings.c
parent76a7d159db39e005ff33314f824fe475d766d256 (diff)
downloadopenttd-cd1dea52ca171f623dc3d92ed39ab2347a1f2023.tar.xz
(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.
Diffstat (limited to 'settings.c')
-rw-r--r--settings.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/settings.c b/settings.c
index 0dde5c2a9..350dd4041 100644
--- a/settings.c
+++ b/settings.c
@@ -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;