diff --git a/avrdude/ChangeLog b/avrdude/ChangeLog index 7e3b175c..d2a65525 100644 --- a/avrdude/ChangeLog +++ b/avrdude/ChangeLog @@ -1,3 +1,7 @@ +2005-10-20 Joerg Wunsch + + * butterfly.c: fix yet another sign extension bug. + 2005-10-14 Joerg Wunsch * avrdude.conf.in (ATmega8515): fix size of calibration diff --git a/avrdude/butterfly.c b/avrdude/butterfly.c index b64a3aca..ce3aad73 100644 --- a/avrdude/butterfly.c +++ b/avrdude/butterfly.c @@ -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);