1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-25 09:15:38 +03:00

Windows inserted \r\n in the EEPROM!

This commit is contained in:
Bertrand Songis 2014-02-20 12:10:26 +01:00
parent 4a9e8d6a4b
commit 0db90e34c3

View file

@ -365,9 +365,9 @@ void StartEepromThread(const char *filename)
{ {
eepromFile = filename; eepromFile = filename;
if (eepromFile) { if (eepromFile) {
fp = fopen(eepromFile, "r+"); fp = fopen(eepromFile, "rb+");
if (!fp) if (!fp)
fp = fopen(eepromFile, "w+"); fp = fopen(eepromFile, "wb+");
if (!fp) perror("error in fopen"); if (!fp) perror("error in fopen");
} }
#ifdef __APPLE__ #ifdef __APPLE__
@ -495,7 +495,7 @@ FRESULT f_open (FIL * fil, const TCHAR *name, BYTE flag)
return FR_INVALID_NAME; return FR_INVALID_NAME;
fil->fsize = tmp.st_size; fil->fsize = tmp.st_size;
} }
fil->fs = (FATFS*)fopen(path, (flag & FA_WRITE) ? "w+" : "r+"); fil->fs = (FATFS*)fopen(path, (flag & FA_WRITE) ? "wb+" : "rb+");
return FR_OK; return FR_OK;
} }