ao-tools/ao-usbload: Pad image with 0xff instead of random bits
[fw/altos] / ao-tools / lib / ao-selfload.c
index 0a23dfda0ae9eccc1be55b24a90dd8b0ecef7aa7..754cd78413037eb445b08395fc6fd819c4686eb0 100644 (file)
@@ -110,6 +110,7 @@ ao_self_write(struct cc_usb *cc, struct ao_hex_image *image)
                        start = image->address;
                if (stop > image->address + image->length)
                        stop = image->address + image->length;
+               memset(block, 0xff, 0x100);
                memcpy(block + start - address, image->data + start - image->address, stop - start);
                ao_self_block_write(cc, address, block);
                ao_self_block_read(cc, address, check);