--- embedtools/src/imgupd.c 2014/02/05 23:11:55 1.5 +++ embedtools/src/imgupd.c 2014/02/05 23:31:55 1.6 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ - * $Id: imgupd.c,v 1.5 2014/02/05 23:11:55 misho Exp $ + * $Id: imgupd.c,v 1.6 2014/02/05 23:31:55 misho Exp $ * ************************************************************************* The ELWIX and AITNET software is distributed under the following @@ -123,7 +123,7 @@ FillStore(int img, int fd) if (wlen == -1) { ESYSERR(0); return -1; - } else if (!wlen || wlen != rlen) { + } else if (wlen && wlen != rlen) { EERROR(EIO, "Readed %d bytes are not equal to written %d bytes\n", rlen, wlen); } else