diff --git a/hardware/arduino/avr/bootloaders/atmega/ATmegaBOOT_168.c b/hardware/arduino/avr/bootloaders/atmega/ATmegaBOOT_168.c index 2b9fefa26..880cf9b41 100644 --- a/hardware/arduino/avr/bootloaders/atmega/ATmegaBOOT_168.c +++ b/hardware/arduino/avr/bootloaders/atmega/ATmegaBOOT_168.c @@ -950,10 +950,10 @@ char getch(void) count++; if (count > MAX_TIME_COUNT) app_start(); - } - - return UDR0; } + + return UDR0; + } else if(bootuart == 2) { while(!(UCSR1A & _BV(RXC1))) { /* 20060803 DojoCorp:: Addon coming from the previous Bootloader*/ diff --git a/libraries/SD/src/File.cpp b/libraries/SD/src/File.cpp index 88d9e9ac9..c3021d6b9 100644 --- a/libraries/SD/src/File.cpp +++ b/libraries/SD/src/File.cpp @@ -44,6 +44,7 @@ File::File(void) { } File::~File(void) { + close(); // Serial.print("Deleted file object"); }