diff options
author | Robin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-11-03 21:37:51 +0000 |
---|---|---|
committer | Robin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-11-03 21:37:51 +0000 |
commit | 1a0ccfed144d67591f3882f62c06b3a4965bc62b (patch) | |
tree | 6d3ca9978bd4b4dfa8bfa745b82ebc0b1f183aca /src/config.c | |
parent | bab1b193f8e8f2abb934d612a65e11d562a78bcc (diff) |
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
Diffstat (limited to 'src/config.c')
-rw-r--r-- | src/config.c | 4 |
1 files changed, 2 insertions, 2 deletions
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<ValueContainerBool *>(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 |