diff --git a/sha3/sha3_s390x.go b/sha3/sha3_s390x.go index c13ec85b50..259ff4dada 100644 --- a/sha3/sha3_s390x.go +++ b/sha3/sha3_s390x.go @@ -112,7 +112,7 @@ func (s *asmState) Write(b []byte) (int, error) { if len(s.buf) == 0 && len(b) >= cap(s.buf) { // Hash the data directly and push any remaining bytes // into the buffer. - remainder := len(s.buf) % s.rate + remainder := len(b) % s.rate kimd(s.function, &s.a, b[:len(b)-remainder]) if remainder != 0 { s.copyIntoBuf(b[len(b)-remainder:])