Hi,

For the following reasons, I think unsigned char is correct for auch[16]
in Noise().

 - In GetMatchCheckSum(), auch[16] is defined as unsigned char.
 - 2040.0 == 16 * 127.5
   127.5 is the average of a uniform distribution from 0 to 255


I have attached a patch.

Best regards,
-- 
TAKAHASHI Kaoru
>From 977c4070c52cc77beaf2ee63fab5c5c135c4c3f3 Mon Sep 17 00:00:00 2001
From: TAKAHASHI Kaoru <[email protected]>
Date: Sat, 22 Aug 2026 03:05:26 +0900
Subject: [PATCH] Fix the type of auch[16] in Noise() to unsigned char

Update it to match how md5_buffer() in used inside GetMatchCheckSum().
---
 eval.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/eval.c b/eval.c
index bd4b31f0..d2e79350 100644
--- a/eval.c
+++ b/eval.c
@@ -2239,7 +2239,8 @@ Noise(const evalcontext * pec, const TanBoard anBoard, int iOutput)
     float r;
 
     if (pec->fDeterministic) {
-        char auchBoard[50], auch[16];
+        char auchBoard[50];
+        unsigned char auch[16];
         int i;
 
         for (i = 0; i < 25; i++) {
-- 
2.47.3

Reply via email to