Fix off-by-one error.

Obtained from:	OpenBSD
This commit is contained in:
Jacques Vidrine 2002-03-05 14:27:19 +00:00
parent c794254d96
commit d96f3089f2

View File

@ -151,7 +151,7 @@ Channel *
channel_lookup(int id)
{
Channel *c;
if (id < 0 || id > channels_alloc) {
if (id < 0 || id >= channels_alloc) {
log("channel_lookup: %d: bad id", id);
return NULL;
}