Fix yet another sign extension bug introduced by renaming "unsigned char"

to "char".


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@538 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
Joerg Wunsch 2005-10-20 11:36:19 +00:00
parent 50b587155d
commit a1c528dbe2
2 changed files with 6 additions and 2 deletions

View File

@ -1,3 +1,7 @@
2005-10-20 Joerg Wunsch <j@uriah.heep.sax.de>
* butterfly.c: fix yet another sign extension bug.
2005-10-14 Joerg Wunsch <j@uriah.heep.sax.de>
* avrdude.conf.in (ATmega8515): fix size of calibration

View File

@ -297,9 +297,9 @@ static int butterfly_initialize(PROGRAMMER * pgm, AVRPART * p)
exit(1);
};
butterfly_recv(pgm, &c, 1);
buffersize = c<<8;
buffersize = (unsigned int)(unsigned char)c<<8;
butterfly_recv(pgm, &c, 1);
buffersize += c;
buffersize += (unsigned int)(unsigned char)c;
fprintf(stderr,
"Programmer supports buffered memory access with buffersize=%i bytes.\n",
buffersize);