Skip to content

Commit 1a2ad44

Browse files
committed
был баг в итерации по массиву в Crc32
1 parent 5ad4bfb commit 1a2ad44

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • src/OneScript.StandardLibrary/Hash

src/OneScript.StandardLibrary/Hash/Crc32.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public override void Initialize()
6262

6363
protected override void HashCore(byte[] array, int ibStart, int cbSize)
6464
{
65-
for (var i = ibStart; i < cbSize - ibStart; i++)
65+
for (var i = ibStart; i < ibStart + cbSize; i++)
6666
_crc = (_crc >> 8) ^ table[array[i] ^ _crc & 0xff];
6767
}
6868

0 commit comments

Comments
 (0)