summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-03-02 14:45:35 +0000
committertron <tron@openttd.org>2006-03-02 14:45:35 +0000
commit57aa648a0efef8be01319b2737e3d09c517365d8 (patch)
treeb587c894d1fbfd8263eac7cc096ca52c15a4e6f6
parent9bbe6876ba22fa21a2ca664dc92faa4f78efd6c6 (diff)
downloadopenttd-57aa648a0efef8be01319b2737e3d09c517365d8.tar.xz
(svn r3733) Fix a bug in r3719, which caused a crash when the default value for a SLE_VAR_CHAR setting was used
-rw-r--r--settings.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/settings.c b/settings.c
index ed8edcace..bd4b086f2 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*)p; break;
+ case SLE_VAR_CHAR: *(char*)ptr = (char)(unsigned long)p; break;
default: NOT_REACHED(); break;
}
break;