mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-29 01:19:11 +00:00
(svn r3733) Fix a bug in r3719, which caused a crash when the default value for a SLE_VAR_CHAR setting was used
This commit is contained in:
@@ -643,7 +643,7 @@ static void ini_load_settings(IniFile *ini, const SettingDesc *sd, const char *g
|
|||||||
case SLE_VAR_STRQ:
|
case SLE_VAR_STRQ:
|
||||||
if (p != NULL) ttd_strlcpy((char*)ptr, p, sld->length);
|
if (p != NULL) ttd_strlcpy((char*)ptr, p, sld->length);
|
||||||
break;
|
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;
|
default: NOT_REACHED(); break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user