merge mtd fix from r17522
authorFelix Fietkau <nbd@openwrt.org>
Sat, 5 Sep 2009 23:40:13 +0000 (23:40 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Sat, 5 Sep 2009 23:40:13 +0000 (23:40 +0000)
SVN-Revision: 17523

package/mtd/src/mtd.c

index 761139f4e79712f3cc9c6ead371f2b1a29c720b6..fb650a0da34b88558d6e66ab18f365251146a642 100644 (file)
@@ -286,7 +286,7 @@ mtd_write(int imagefd, const char *mtd)
                        break;
 
                if (jffs2file) {
-                       if (memcmp(buf, JFFS2_EOF, sizeof(JFFS2_EOF)) == 0) {
+                       if (memcmp(buf, JFFS2_EOF, sizeof(JFFS2_EOF) - 1) == 0) {
                                if (!quiet)
                                        fprintf(stderr, "\b\b\b   ");
                                if (quiet < 2)