the return value should be checked against the size of sd_buf instead of buf
This commit is contained in:
parent
9b4cd05e1f
commit
84f2a077de
1 changed files with 1 additions and 1 deletions
|
@ -457,7 +457,7 @@ sd_write(sd_offset_t offset, char *buf, size_t size)
|
|||
|
||||
for(i = 0; i < SD_READ_BLOCK_ATTEMPTS; i++) {
|
||||
r = sd_read_block(address, sd_buf);
|
||||
if(r == sizeof(buf)) {
|
||||
if(r == sizeof(sd_buf)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue