Skip to content

Incorrect implementation of PbList.hashcode #87

Closed
@joshua-i

Description

@joshua-i

PbList.hashcode intends to implement the Jenkins hash function. However, in lines like this it is adding before applying the bit shift. Instead of (hash + hash << 10) it should be something like (hash + (hash << 10)).

It was also suggested offline that we should change (...) & 0x3fffffff to 0x3fffffff & (...) , though I don't fully understand why.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions