From 061a85a167fedebb7710429d9cc737fc31e69a9a Mon Sep 17 00:00:00 2001 From: Sarina Date: Mon, 22 Jul 2024 16:55:24 +0330 Subject: [PATCH] Fix handling floating traffic limit in add_user.sh --- core/scripts/hysteria2/add_user.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/scripts/hysteria2/add_user.sh b/core/scripts/hysteria2/add_user.sh index d90ca10..90b3844 100644 --- a/core/scripts/hysteria2/add_user.sh +++ b/core/scripts/hysteria2/add_user.sh @@ -43,7 +43,7 @@ add_user() { fi # Convert GB to bytes (1 GB = 1073741824 bytes) - traffic=$((traffic_gb * 1073741824)) + traffic=$(echo "$traffic_gb * 1073741824" | bc) if [ ! -f "$USERS_FILE" ]; then echo "{}" > "$USERS_FILE"