diff --git a/host/xmosdfu/xmosdfu.cpp b/host/xmosdfu/xmosdfu.cpp index a0aca676..52199198 100644 --- a/host/xmosdfu/xmosdfu.cpp +++ b/host/xmosdfu/xmosdfu.cpp @@ -311,6 +311,11 @@ int read_dfu_image(char *file) { break; } + else if (numBytes < 0) + { + fprintf(stderr,"dfu_upload error (%d)\n", numBytes); + break; + } fwrite(block_data, 1, block_size, outFile); block_count++; }