mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-25 20:02:37 +03:00
Invalid read return value fix (#7817)
Fixes #7814. Return 0, not MAXINT, when a read is called on a File without a backing instance of a SPIFFS/LittleFS/SD File.
This commit is contained in:
parent
98a19ab245
commit
34545a160d
@ -68,7 +68,7 @@ int File::read() {
|
||||
|
||||
size_t File::read(uint8_t* buf, size_t size) {
|
||||
if (!_p)
|
||||
return -1;
|
||||
return 0;
|
||||
|
||||
return _p->read(buf, size);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user