1
0
mirror of https://github.com/anope/anope.git synced 2026-07-08 11:23:13 +02:00

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
This commit is contained in:
Robin Burchell w00t@inspircd.org
2008-11-03 21:37:51 +00:00
parent bab1b193f8
commit 1a0ccfed14
+2 -2
View File
@@ -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