From 65c951ab5d7141594c23c14f51e42a42a096fef1 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Thu, 18 Sep 1997 15:32:29 +0000 Subject: Correct off-by-one error in expect messages. svn path=/trunk/; revision=1368 --- driver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/driver.c b/driver.c index 98147c95..ca89b0ad 100644 --- a/driver.c +++ b/driver.c @@ -1685,8 +1685,8 @@ const struct method *proto; /* protocol method table */ } /* check to see if the numbers matched? */ - if (msgsizes && msglen != msgsizes[num]) - error(0, 0, "size of message %d (%d) was not what was expected (%d)", num, msglen, msgsizes[num]); + if (msgsizes && msglen != msgsizes[num-1]) + error(0, 0, "size of message %d (%d) was not what was expected (%d)", num, msglen, msgsizes[num-1]); /* end-of-message processing starts here */ if (outlevel == O_VERBOSE) -- cgit v1.2.3