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:
parent
995bd68034
commit
044536a3f2
|
@ -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]) {
|
||||
|
|
Loading…
Reference in New Issue