From 1a0ccfed144d67591f3882f62c06b3a4965bc62b Mon Sep 17 00:00:00 2001 From: "Robin Burchell w00t@inspircd.org" Date: Mon, 3 Nov 2008 21:37:51 +0000 Subject: Fix a random segfault (no idea how BSFantasyChar is NULL, CBX, this will be config related, please examine). Also fix: for some reason, using dynamic_cast() instead of a C-style cast here explodes, CBX? git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1517 5417fbe8-f217-4b02-8779-1006273d7864 --- src/config.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/config.c b/src/config.c index e82193694..87bdfce24 100644 --- a/src/config.c +++ b/src/config.c @@ -800,7 +800,7 @@ int ServerConfig::Read(bool bail) break; case DT_BOOLEAN: { bool val = vi.GetBool(); - ValueContainerBool *vcb = dynamic_cast(Values[Index].val); + ValueContainerBool *vcb = (ValueContainerBool *)Values[Index].val; vcb->Set(&val, sizeof(bool)); } break; @@ -1907,7 +1907,7 @@ int read_config(int reload) } if (s_BotServ) { - if (!*BSFantasyCharacter) + if (!BSFantasyCharacter || !*BSFantasyCharacter) BSFantasyCharacter = sstrdup("!"); if (*BSFantasyCharacter && (strlen(BSFantasyCharacter) > 1)) { printf -- cgit