From b1930811f938de6e437094fee2c7638b32a4e68d Mon Sep 17 00:00:00 2001 From: v4n <105587619+v4n00@users.noreply.github.com> Date: Thu, 6 Mar 2025 01:29:14 +0200 Subject: [PATCH] fix: segfault from infinite recursion --- h2mm | 7 +++++-- install.sh | 5 ++++- version | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/h2mm b/h2mm index 977e6c8..c726fb4 100755 --- a/h2mm +++ b/h2mm @@ -52,11 +52,14 @@ function log() { echo -e "$*" >&2 ;; ERROR) - log ERROR "$*" >&2 + echo -e "${RED}[ERROR]${NC} $*" >&2 ;; PROMPT) echo -ne "$*" >&2 ;; + *) + echo -e "$*" >&2 + ;; esac } @@ -597,7 +600,7 @@ function mod_reset() { fi log PROMPT "Are you sure you want to ${RED}reset${NC} all installed mods? (Y/n): " - read -r confirm + read confirm if [[ "$confirm" == "y" || "$confirm" == "Y" || "$confirm" = "" ]]; then rm -f "$MODS_DIR"/*.patch_* rm -f "$DB_FILE" diff --git a/install.sh b/install.sh index 0784f1f..38a8e75 100755 --- a/install.sh +++ b/install.sh @@ -18,11 +18,14 @@ function log() { echo -e "$*" >&2 ;; ERROR) - log ERROR "$*" >&2 + echo -e "${RED}[ERROR]${NC} $*" >&2 ;; PROMPT) echo -ne "$*" >&2 ;; + *) + echo -e "$*" >&2 + ;; esac } diff --git a/version b/version index 940ac09..5503126 100644 --- a/version +++ b/version @@ -1 +1 @@ -0.3.9 +0.3.10