From b766b3a5976e3392a833e441ade8c06b47d8aebe Mon Sep 17 00:00:00 2001 From: cyberbotx Date: Wed, 16 Jun 2010 23:50:33 +0000 Subject: Minor edits to fix compile errors/warnings with clang and a small compile warning under Windows (gotta work on the other 450+ Windows warnings sometime). git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@3006 5417fbe8-f217-4b02-8779-1006273d7864 --- src/core/cs_access.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/cs_access.c b/src/core/cs_access.c index fdca01dfd..bc68c8c58 100644 --- a/src/core/cs_access.c +++ b/src/core/cs_access.c @@ -88,7 +88,7 @@ static int access_view(User *u, int index, ChannelInfo *ci, int *sent_header) if (!access || !access->in_use) return 0; - + if (!*sent_header) { notice_lang(Config.s_ChanServ, u, CHAN_ACCESS_LIST_HEADER, ci->name.c_str()); @@ -121,6 +121,7 @@ static int access_view_callback(User *u, int num, va_list args) { ChannelInfo *ci = va_arg(args, ChannelInfo *); int *sent_header = va_arg(args, int *); + if (num < 1 || num > ci->GetAccessCount()) return 0; return access_view(u, num - 1, ci, sent_header); } -- cgit