summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2006-11-10 11:45:50 +0000
committerDarkvater <darkvater@openttd.org>2006-11-10 11:45:50 +0000
commit82f7140357b8b13e5f3c2eea715af936e5debb28 (patch)
tree16b842052c5875afcaeb20c0dfc3862c600857d6
parentebd054b8d839e1945c41a908a9898e7726515c4d (diff)
downloadopenttd-82f7140357b8b13e5f3c2eea715af936e5debb28.tar.xz
(svn r7124) -Fix (r37xx): sizeof(bool) = 4 for (certain) OSX do not assume it is 1. This would break
the saving of certain values to the config. Thanks PandaMojo ford ebugging.
-rw-r--r--settings.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/settings.c b/settings.c
index 2d1bb288c..a8bff597d 100644
--- a/settings.c
+++ b/settings.c
@@ -776,6 +776,8 @@ static void ini_save_settings(IniFile *ini, const SettingDesc *sd, const char *g
case SDT_MANYOFMANY:
switch (GetVarMemType(sld->conv)) {
case SLE_VAR_BL:
+ if (*(bool*)ptr == (bool)(unsigned long)p) continue;
+ break;
case SLE_VAR_I8:
case SLE_VAR_U8:
if (*(byte*)ptr == (byte)(unsigned long)p) continue;