From f2eaf1f554a876b353fa5b471b2619509e880340 Mon Sep 17 00:00:00 2001 From: Vyacheslav Spirin <37476211+vyacheslav-spirin@users.noreply.github.com> Date: Tue, 18 Jul 2023 15:16:46 +0700 Subject: [PATCH] Fixed invalid hash calculation in Update method Fixed mistake with "index" variable. --- xxHashSharp/xxHash.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xxHashSharp/xxHash.cs b/xxHashSharp/xxHash.cs index c47e366..543ebf9 100644 --- a/xxHashSharp/xxHash.cs +++ b/xxHashSharp/xxHash.cs @@ -240,7 +240,7 @@ public bool Update(byte[] input, int len) _state.v4 = CalcSubHash(_state.v4, _state.memory, index); index += 4; - index = 0; + index = 16 - _state.memsize; _state.memsize = 0; }