Skip to content

Commit 3ddfa3c

Browse files
committed
Fix input of pjwHash64
Originaly it was a C `unsigned char`
1 parent c905ff2 commit 3ddfa3c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compiler/src/dotty/tools/dotc/core/tasty/TastyPickler.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ class TastyPickler(val rootCls: ClassSymbol) {
8181
var h = 0L
8282
var i = 0
8383
while (i < data.length) {
84-
h = (h << 4) + data(i)
84+
val d = data(i) & 0xFFL // Interpret byte as unsigned byte
85+
h = (h << 4) + d
8586
val high = h & 0xF0000000L
8687
if (high != 0)
8788
h ^= high >> 24

0 commit comments

Comments
 (0)