From 3e25aaf1c6e5224dbc9ce76834884edf24422120 Mon Sep 17 00:00:00 2001 From: Hamish Coleman Date: Sat, 28 May 2022 17:18:28 +0200 Subject: [PATCH] Dont try to read zero byte patch files --- scripts/hexpatch.pl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/hexpatch.pl b/scripts/hexpatch.pl index f82783d..9b27f7c 100755 --- a/scripts/hexpatch.pl +++ b/scripts/hexpatch.pl @@ -258,6 +258,14 @@ sub main() { next; } + if (-z $patchfile) { + warn("Patchfile $patchfile is zero bytes, skipping\n"); + if ($fail_on_missing) { + exit(1); + } + next; + } + my $db = read_patchfile($patchfile); if (!defined($db)) {