mirror of
https://github.com/mariusgreuel/avrdude.git
synced 2025-09-27 14:35:27 +00:00
bug #26412: avrdude segfaults when called with a programmer that does not
support it Do not call pgm->perform_osccal() unless it is != 0. git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@822 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
11
main.c
11
main.c
@@ -786,8 +786,15 @@ int main(int argc, char * argv [])
|
||||
* perform an RC oscillator calibration
|
||||
* as outlined in appnote AVR053
|
||||
*/
|
||||
fprintf(stderr, "%s: performing RC oscillator calibration\n", progname);
|
||||
exitrc = pgm->perform_osccal(pgm);
|
||||
if (pgm->perform_osccal == 0) {
|
||||
fprintf(stderr,
|
||||
"%s: programmer does not support RC oscillator calibration\n",
|
||||
progname);
|
||||
exitrc = 1;
|
||||
} else {
|
||||
fprintf(stderr, "%s: performing RC oscillator calibration\n", progname);
|
||||
exitrc = pgm->perform_osccal(pgm);
|
||||
}
|
||||
if (exitrc == 0 && quell_progress < 2) {
|
||||
fprintf(stderr,
|
||||
"%s: calibration value is now stored in EEPROM at address 0\n",
|
||||
|
Reference in New Issue
Block a user