Skip to content

Commit

Permalink
fix serval bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
AloneCafe committed May 28, 2019
1 parent 4f6c0a1 commit ef334a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions writer.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ int main(int argc, char **argv) {
fprintf(stdout, "Data: %s\nVHD: %s (offset LBA: %lld)\nTotal bytes to write: %lld\nTotal sectors to write: %lld\nTotal bytes written: %lld\nTotal sectors written: %lld\n",
data_file_name, vhd_file_name, lba, data_file_size, data_file_size / 512 + (data_file_size % 512 != 0), total_written_bytes, total_written_bytes / 512 + (total_written_bytes % 512 != 0));

if (total_written_bytes <= data_file_size) {
if (total_written_bytes < data_file_size) {
fprintf(stdout, "\n!!! Detected the tail of VHD image file, the writing data has been truncated!\n");
}

Expand All @@ -247,4 +247,4 @@ int main(int argc, char **argv) {

#ifdef __cplusplus
}
#endif
#endif

0 comments on commit ef334a6

Please sign in to comment.