From 3f86408b9cb66d71f709490d57858122e1d5ccdf Mon Sep 17 00:00:00 2001
From: aclist <92275929+aclist@users.noreply.github.com>
Date: Mon, 15 May 2023 10:56:15 +0900
Subject: [PATCH] fix: do not capture return code of local var declaration

---
 dzgui.sh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/dzgui.sh b/dzgui.sh
index 18bb64f..6db19a0 100755
--- a/dzgui.sh
+++ b/dzgui.sh
@@ -1,7 +1,7 @@
 #!/usr/bin/env bash
 
 set -o pipefail
-version=3.2.23
+version=3.2.24
 
 aid=221100
 game="dayz"
@@ -1748,7 +1748,8 @@ check_map_count(){
 	if [[ ! -f /etc/sysctl.d/dayz.conf ]]; then
 		$steamsafe_zenity --question --width 500 --title="DZGUI" --cancel-label="Cancel" --ok-label="OK" --text "sudo password required to check system vm map count." 2>/dev/null
 		if [[ $? -eq 0 ]]; then
-			local pass=$($steamsafe_zenity --password)
+			local pass
+			pass=$($steamsafe_zenity --password)
 			[[ $? -eq 1 ]] && exit 1
 			local ct=$(sudo -S <<< "$pass" sh -c "sysctl -q vm.max_map_count | awk -F'= ' '{print \$2}'")
 			local new_ct