From: Ari Johnson Date: Tue, 10 May 2011 23:31:13 +0000 (-0400) Subject: Initialize snooper array earlier in initializesock() X-Git-Url: https://git.theari.com/?a=commitdiff_plain;h=7cceadac6bf54ce2fa2d6f4abe05eec97491354d;p=cobramush.git Initialize snooper array earlier in initializesock() --- diff --git a/src/bsd.c b/src/bsd.c index ec3f02a..6d57383 100644 --- a/src/bsd.c +++ b/src/bsd.c @@ -1820,6 +1820,8 @@ initializesock(int s, int os, char *addr, char *ip, int use_ssl mush_panic("Out of memory."); d->descriptor = s; d->outdesc = os; + for (n = 0; n < MAX_SNOOPS; n++) + d->snooper[n] = -1; d->input_handler = do_command; d->connected = 0; d->connected_at = mudtime; @@ -1899,8 +1901,6 @@ initializesock(int s, int os, char *addr, char *ip, int use_ssl if (d->player == 0) welcome_user(d); - for (n = 0; n < MAX_SNOOPS; n++) - d->snooper[n] = -1; return d; }