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

to "char".


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@538 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
joerg_wunsch 2005-10-20 11:36:19 +00:00
parent d84fe7af5e
commit 214b2ee0e7
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> 2005-10-14 Joerg Wunsch <j@uriah.heep.sax.de>
* avrdude.conf.in (ATmega8515): fix size of calibration * avrdude.conf.in (ATmega8515): fix size of calibration

View File

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