diff --git a/audiogame-manager.sh b/audiogame-manager.sh index 0ed730e..79bc81e 100755 --- a/audiogame-manager.sh +++ b/audiogame-manager.sh @@ -312,9 +312,8 @@ download() { ;; "exe") # Check if it's a valid Windows executable by looking at the MZ header - if ! hexdump -n 2 -v -e '/1 "%02X"' "${cache}/${dest}" | grep -q "4D5A"; then - downloadError=0 - fi + hexdump -n 2 -v -e '/1 "%02X"' "${cache}/${dest}" | grep -q "4D5A" + downloadError=$? ;; "wad") if [[ "$(file -b --mime-type "${cache}/${dest}")" != "application/octet-stream" ]]; then