Skip to content

Commit

Permalink
fixes #237
Browse files Browse the repository at this point in the history
and a build warning
  • Loading branch information
pellepl committed Apr 4, 2019
1 parent 1350deb commit ec68ba8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/spiffs_nucleus.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/test/test_spiffs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ec68ba8

Please sign in to comment.