From: asterix Date: Thu, 12 Aug 2010 15:54:54 +0000 (+0000) Subject: Fix write check. X-Git-Tag: 2.6.0~211 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=2deaea82d047e5731b28b59b4652ad830b46e3fe;p=bertos.git Fix write check. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4179 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/bertos/net/xmodem.c b/bertos/net/xmodem.c index ce8d038e..fbf43386 100644 --- a/bertos/net/xmodem.c +++ b/bertos/net/xmodem.c @@ -268,7 +268,7 @@ bool xmodem_recv(KFile *ch, KFile *fd) if (last_block_done < blocknr) { /* Call user function to flush the buffer */ - if (kfile_write(fd, block_buffer, blocksize)) + if (kfile_write(fd, block_buffer, blocksize) == (size_t)blocksize) { /* Acknowledge block and clear error counter */ kfile_putc(XM_ACK, ch);