fix #2037 fail if compared file size is 0

This commit is contained in:
Jeffrey Crowell 2015-05-05 14:46:46 -04:00
parent ccfae11ebc
commit 0c8837de17

View File

@ -483,6 +483,11 @@ static int cmd_cmp(void *data, const char *input) {
}
}
if (r_file_size (file2) <= 0) {
eprintf ("Cannot compare with file %s\n", file2);
return R_FALSE;
}
if (!(core2 = r_core_new ())) {
eprintf ("Cannot init diff core\n");
return R_FALSE;