1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-30 16:24:09 +03:00

Applying adafruit SD updates (available() overful fix).

http://code.google.com/p/arduino/issues/detail?id=595
This commit is contained in:
David A. Mellis
2011-09-09 16:57:00 -04:00
parent f3d8628c5e
commit 5ba38fa9bd
2 changed files with 5 additions and 2 deletions

View File

@ -101,7 +101,10 @@ int File::read(void *buf, uint16_t nbyte) {
int File::available() {
if (! _file) return 0;
return size() - position();
uint32_t n = size() - position();
return n > 0X7FFF ? 0X7FFF : n;
}
void File::flush() {