Fix the maxsize comparision in stk500v2_jtagmkII_recv(), it was off

by one.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@644 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
Joerg Wunsch 2006-09-06 22:29:27 +00:00
parent 995bd68034
commit 044536a3f2
1 changed files with 2 additions and 2 deletions

View File

@ -306,10 +306,10 @@ static int stk500v2_jtagmkII_recv(PROGRAMMER * pgm, unsigned char msg[],
progname);
return -1;
}
if (rv > maxsize) {
if (rv - 1 > maxsize) {
fprintf(stderr,
"%s: stk500v2_jtagmkII_recv(): got %u bytes, have only room for %u bytes\n",
progname, (unsigned)rv, maxsize);
progname, (unsigned)rv - 1, maxsize);
rv = maxsize;
}
switch (jtagmsg[0]) {