the return value should be checked against the size of sd_buf instead of buf

This commit is contained in:
nvt-se 2009-11-03 16:18:37 +00:00
parent 9b4cd05e1f
commit 84f2a077de

View File

@ -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;
}
}