From 2cac29dcbea5012f3575f78857ae991c7e828091 Mon Sep 17 00:00:00 2001 From: Michael Poole Date: Tue, 30 Mar 2004 04:25:14 +0000 Subject: [PATCH] Fix uninitialized mod_chanmode element in debug build * Convert an old-style auto-variable mod_chanmode to use mod_chanmode_init() so that all fields are initialized. git-archimport-id: srvx@srvx.net--2004-srvx/srvx--devo--1.3--patch-38 --- src/proto-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/proto-common.c b/src/proto-common.c index 3fcadd7..5a7a689 100644 --- a/src/proto-common.c +++ b/src/proto-common.c @@ -635,8 +635,8 @@ mod_chanmode(struct userNode *who, struct chanNode *channel, char **modes, unsig int irc_make_chanmode(struct chanNode *chan, char *out) { struct mod_chanmode change; + mod_chanmode_init(&change); change.modes_set = chan->modes; - change.modes_clear = change.argc = 0; change.new_limit = chan->limit; safestrncpy(change.new_key, chan->key, sizeof(change.new_key)); return strlen(mod_chanmode_format(&change, out)); -- 2.20.1