- Fixed a bug if me::info was set to "".

This commit is contained in:
Bram Matthys 2004-07-21 20:57:22 +00:00
parent c38621994b
commit 9b9aa1d80f
2 changed files with 16 additions and 0 deletions

View file

@ -281,3 +281,4 @@
- doc/example.conf now simply refers to unreal32docs.html for oper flags (#0001973)
reported by vonitsanet and AngryWolf.
- Fixed an MacOS X crash-on-first-connect if SSL was enabled (#0001982), reported by bit.
- Fixed a bug if me::info was set to "".

View file

@ -2879,6 +2879,8 @@ int _test_me(ConfigFile *conf, ConfigEntry *ce)
if (cep->ce_vardata)
{
int valid = 0;
char *p;
if (strlen(cep->ce_vardata) > (REALLEN-1))
{
config_error("%s:%i: too long me::info, must be max. %i characters",
@ -2886,6 +2888,19 @@ int _test_me(ConfigFile *conf, ConfigEntry *ce)
errors++;
}
/* Valid me::info? Any data except spaces is ok */
for (p=cep->ce_vardata; *p; p++)
if (*p != ' ')
{
valid = 1;
break;
}
if (!valid)
{
config_error("%s:%i: empty me::info, should be a server description.",
ce->ce_fileptr->cf_filename, ce->ce_varlinenum);
errors++;
}
}
}
if (!(cep = config_find_entry(ce->ce_entries, "numeric")))