From 8cf4fe9cdf358fb39da45dd79545bc77419ceebd Mon Sep 17 00:00:00 2001 From: tron Date: Thu, 2 Mar 2006 14:45:35 +0000 Subject: (svn r3733) Fix a bug in r3719, which caused a crash when the default value for a SLE_VAR_CHAR setting was used --- settings.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'settings.c') 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; -- cgit v1.2.3-54-g00ecf