diff options
| author | 2012-02-20 14:34:52 +0000 | |
|---|---|---|
| committer | 2012-02-20 14:34:52 +0000 | |
| commit | 1aed309a48400cbd69a24bc1becc34f5a1d8ca54 (patch) | |
| tree | bf32c017300f33cb97341e456d9ca5e11471a0ab /src/tools | |
| parent | bd25da6519f9894fb3776797093acfeb22d07bb2 (diff) | |
Fixed empty CHD creation for HDD's (no whatsnew)
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/chdman.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/chdman.c b/src/tools/chdman.c index 94beb4936b0..20b53fd1cc4 100644 --- a/src/tools/chdman.c +++ b/src/tools/chdman.c @@ -963,7 +963,7 @@ static void parse_input_start_end(const parameters_t ¶ms, UINT64 logical_siz input_start = parse_number(*input_start_hunk_str) * hunkbytes; if (input_start_frame_str != NULL) input_start = parse_number(*input_start_frame_str) * framebytes; - if (input_start >= input_end) + if (input_start > input_end) report_error(1, "Input start offset greater than input file size"); // process input length @@ -1613,7 +1613,7 @@ static void do_create_hd(parameters_t ¶ms) // process input start/end (needs to know hunk_size) UINT64 input_start; UINT64 input_end; - parse_input_start_end(params, core_fsize(input_file), hunk_size, hunk_size, input_start, input_end); + parse_input_start_end(params, input_file ? core_fsize(input_file) : 0, hunk_size, hunk_size, input_start, input_end); // process compression chd_codec_type compression[4]; |
