diff options
author | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-06-16 23:50:33 +0000 |
---|---|---|
committer | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-06-16 23:50:33 +0000 |
commit | b766b3a5976e3392a833e441ade8c06b47d8aebe (patch) | |
tree | 04d35cffd9f84d22059cb150ec4fa3ad6749f537 /src/core/cs_access.c | |
parent | 834f4d1bf0c228f35f392808d3882ec3c1a43444 (diff) |
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
Diffstat (limited to 'src/core/cs_access.c')
-rw-r--r-- | src/core/cs_access.c | 3 |
1 files changed, 2 insertions, 1 deletions
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); } |