Skip to content

Commit a8470a7

Browse files
authored
Allow log full FUL to be written to last byte (#438)
Fixes #406
1 parent 50ae994 commit a8470a7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/FSCache.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ int FSCache::read(uint32_t address, const void *data, int len)
8484
int bytesCopied = 0;
8585

8686
// Ensure that the operation is within the limits of the device
87-
if (address < flash.getFlashStart() || address + len >= flash.getFlashEnd())
87+
if (address < flash.getFlashStart() || address + len > flash.getFlashEnd())
8888
return DEVICE_INVALID_PARAMETER;
8989

9090
// Read operation may span multiple cache boundaries... so we iterate over blocks as necessary.
@@ -116,7 +116,7 @@ int FSCache::write(uint32_t address, const void *data, int len)
116116
int bytesCopied = 0;
117117

118118
// Ensure that the operation is within the limits of the device
119-
if (address < flash.getFlashStart() || address + len >= flash.getFlashEnd())
119+
if (address < flash.getFlashStart() || address + len > flash.getFlashEnd())
120120
return DEVICE_INVALID_PARAMETER;
121121

122122
#ifdef CODAL_FS_CACHE_VALIDATE

0 commit comments

Comments
 (0)