Function AddRecentPlayer would cause a crash if someone connected then dropped link before putting in a name.
Simple fix added in code, not yet in github:
Code:
@@ -4920,6 +4935,8 @@
struct recent_player *this;
time_t ct;
int max_vnum;
+ if (!chname || !*chname) // dropped connection with no name given
+ return FALSE;
ct = time(0); /* Grab the current time */
<rant>
Also - why is that code in act.
wizard.c? I understand ACMD(do_recent) needs to be there, but the helper code needs to be in comm.c. And it has a strange naming convention:
Code:
static int get_max_recent(void)
static void clear_recent(struct recent_player *this)
static struct recent_player *create_recent(void)
bool AddRecentPlayer(char *chname, char *chhost, bool newplr, bool cpyplr)
void free_recent_players(void)
ACMD(do_recent)
Whatever happened with the single camelcase function?