Change odd-ball map_ptr() to use remainder like the others.

This commit is contained in:
Wayne Davison
2020-05-24 20:38:48 -07:00
parent d474f2986e
commit 739fa96737

View File

@@ -373,7 +373,7 @@ void file_checksum(const char *fname, const STRUCT_STAT *st_p, char *sum)
remainder = (int32)(len - i);
if (remainder > 0)
XXH64_update(state, (uchar *)map_ptr(buf, i, CHUNK_SIZE), remainder);
XXH64_update(state, (uchar *)map_ptr(buf, i, remainder), remainder);
SIVAL64(sum, 0, XXH64_digest(state));
XXH64_freeState(state);