Page 1 of 1

SdFat - file.write() fix

Posted: Sun Jun 25, 2017 11:18 am
by Pito
It seems the file.write(buf,bufsize) for bufsizes >128kB crashes, BillG has offered to me the following fix which works here:
Try the following changes to src/FatLib/FatFile.cpp

At line 769 change
uint8_t nb = toRead >> 9;
to
size_t nb = toRead >> 9;

At line 1442 change
uint8_t nBlock = nToWrite >> 9;
to
size_t nBlock = nToWrite >> 9;