Welcome to the Builder Academy

Question Bug in act.wizard.c

More
13 Nov 2013 22:31 #4476 by thomas
Bug in act.wizard.c was created by thomas
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?
The following user(s) said Thank You: Papaya Pete

Please Log in or Create an account to join the conversation.

More
13 Nov 2013 23:04 - 13 Nov 2013 23:05 #4478 by Rumble
Replied by Rumble on topic Bug in act.wizard.c
Bug fix committed to github.

Rumble
The Builder Academy
tbamud.com 9091
rumble@tbamud.com
Last edit: 13 Nov 2013 23:05 by Rumble.

Please Log in or Create an account to join the conversation.

Time to create page: 0.393 seconds