Index: stk500.c =================================================================== RCS file: /home/cvs/avrdude/avrdude/stk500.c,v retrieving revision 1.55 diff -u -u -r1.55 stk500.c --- stk500.c 30 Jan 2007 13:41:53 -0000 1.55 +++ stk500.c 6 Mar 2007 07:08:24 -0000 @@ -490,16 +490,20 @@ progname, p->desc); } else { - buf[0] = n_extparms+1; + n_extparms = 1; /* EEPROM only */ + } - /* - * m is currently pointing to eeprom memory if the part has it - */ - if (m) - buf[1] = m->page_size; - else - buf[1] = 0; - + buf[0] = n_extparms+1; + + /* + * m is currently pointing to eeprom memory if the part has it + */ + if (m) + buf[1] = m->page_size; + else + buf[1] = 0; + + if (n_extparms > 1) { buf[2] = p->pagel; buf[3] = p->bs2; @@ -509,12 +513,12 @@ else buf[4] = 1; } - - rc = stk500_set_extended_parms(pgm, n_extparms+1, buf); - if (rc) { - fprintf(stderr, "%s: stk500_initialize(): failed\n", progname); - exit(1); - } + } + + rc = stk500_set_extended_parms(pgm, n_extparms+1, buf); + if (rc) { + fprintf(stderr, "%s: stk500_initialize(): failed\n", progname); + exit(1); } }