summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarkvater <Darkvater@openttd.org>2006-03-13 23:10:02 +0000
committerDarkvater <Darkvater@openttd.org>2006-03-13 23:10:02 +0000
commitd4479fc1a214f76a6aeb61e1da6a193e4af19d09 (patch)
treea55c4647050232599cd21ab6d2e3b871c3d031e2
parent8505f4ed41dc7045cc1a6f36ed3d2d4f035dbb63 (diff)
downloadopenttd-d4479fc1a214f76a6aeb61e1da6a193e4af19d09.tar.xz
(svn r3852) - Revert r3733 which fixed the default value loading for char, but broke loading a set value. Added a better fix which needs a char value to be a string (eg enclosed in double-quotes)
-rw-r--r--settings.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/settings.c b/settings.c
index 7a11a9515..0a91f5708 100644
--- a/settings.c
+++ b/settings.c
@@ -643,7 +643,7 @@ static void ini_load_settings(IniFile *ini, const SettingDesc *sd, const char *g
case SLE_VAR_STRQ:
if (p != NULL) ttd_strlcpy((char*)ptr, p, sld->length);
break;
- case SLE_VAR_CHAR: *(char*)ptr = (char)(unsigned long)p; break;
+ case SLE_VAR_CHAR: *(char*)ptr = *(char*)p; break;
default: NOT_REACHED(); break;
}
break;
@@ -1300,7 +1300,7 @@ const SettingDesc _patch_settings[] = {
static const SettingDesc _currency_settings[] = {
SDT_VAR(CurrencySpec, rate, SLE_UINT16, S, 0, 1, 0, 100, STR_NULL, NULL),
- SDT_CHR(CurrencySpec, separator, S, 0, '.', STR_NULL, NULL),
+ SDT_CHR(CurrencySpec, separator, S, 0, ".", STR_NULL, NULL),
SDT_VAR(CurrencySpec, to_euro, SLE_UINT16, S, 0, 0, 0,1000, STR_NULL, NULL),
SDT_STR(CurrencySpec, prefix, SLE_STRQ, S, 0, NULL, STR_NULL, NULL),
SDT_STR(CurrencySpec, suffix, SLE_STRQ, S, 0, " credits", STR_NULL, NULL),