mirror of
https://github.com/radareorg/radare2.git
synced 2025-01-27 16:25:30 +00:00
fix #2037 fail if compared file size is 0
This commit is contained in:
parent
ccfae11ebc
commit
0c8837de17
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user