and a build warning
This commit is contained in:
Peter Andersson
2019-04-04 21:19:19 +02:00
parent 1350deb54c
commit ec68ba8208
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -2030,7 +2030,7 @@ s32_t spiffs_object_read(
// remaining data in page
len_to_read = MIN(len_to_read, SPIFFS_DATA_PAGE_SIZE(fs) - (cur_offset % SPIFFS_DATA_PAGE_SIZE(fs)));
// remaining data in file
len_to_read = MIN(len_to_read, fd->size);
len_to_read = MIN(len_to_read, fd->size - cur_offset);
SPIFFS_DBG("read: offset:"_SPIPRIi" rd:"_SPIPRIi" data spix:"_SPIPRIsp" is data_pix:"_SPIPRIpg" addr:"_SPIPRIad"\n", cur_offset, len_to_read, data_spix, data_pix,
(u32_t)(SPIFFS_PAGE_TO_PADDR(fs, data_pix) + sizeof(spiffs_page_header) + (cur_offset % SPIFFS_DATA_PAGE_SIZE(fs))));
if (len_to_read <= 0) {
+1 -1
View File
@@ -32,7 +32,7 @@ static unsigned char *_area = NULL;
static u32_t addr_offset = 0;
static int *_erases;
static char _path[256];
static char _path[255+32];
static u32_t bytes_rd = 0;
static u32_t bytes_wr = 0;
static u32_t reads = 0;