From a87aa7230a2745db8d6a6d807e87a28f3fa6d412 Mon Sep 17 00:00:00 2001 From: Tixx <83774803+WiserTixx@users.noreply.github.com> Date: Sun, 27 Jul 2025 01:07:23 +0200 Subject: [PATCH] Make null termination in hex encoding more clear --- include/Utils.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/Utils.h b/include/Utils.h index 00a8a64..3c8381e 100644 --- a/include/Utils.h +++ b/include/Utils.h @@ -236,7 +236,7 @@ namespace Utils { for (size_t i = 0; i < sha256_len; i++) { char buf[3]; sprintf(buf, "%02x", sha256_value[i]); - buf[2] = 0; + buf[2] = NULL; result += buf; } return result; @@ -280,7 +280,7 @@ namespace Utils { for (size_t i = 0; i < sha256_len; i++) { char buf[3]; sprintf(buf, "%02x", sha256_value[i]); - buf[2] = 0; + buf[2] = NULL; result += buf; } return result;