Skip to content

Commit

Permalink
update parser() function to zero arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
mcpcpc authored Aug 31, 2020
1 parent bf12191 commit 35cab62
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions kirc.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,9 @@ static void
parser(char *in) {

int len;
char ltr[200], cha[IRC_CHAN_MAX], nic[200], hos[200], \
usr[200], cmd[200], msg[200], pre[200];
char ltr[200], cha[IRC_CHAN_MAX] = {0}, nic[200] = {0}, hos[200], \
usr[200] = {0}, cmd[200] = {0}, msg[200] = {0}, pre[200] = {0};

cmd[0] = msg[0] = pre[0] = '\0';
if (verb) printf(">> %s\n", in);
if (!strncmp(in, "PING", 4)) {
in[1] = 'O';
Expand Down

0 comments on commit 35cab62

Please sign in to comment.