Skip to content

Commit 53b85bb

Browse files
fix: make HashUtil::HashBytes more platform independent (#814)
Co-authored-by: Connor Tsui <[email protected]>
1 parent 471ff68 commit 53b85bb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/include/common/util/hash_util.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class HashUtil {
3333
// https://github.com/greenplum-db/gpos/blob/b53c1acd6285de94044ff91fbee91589543feba1/libgpos/src/utils.cpp#L126
3434
hash_t hash = length;
3535
for (size_t i = 0; i < length; ++i) {
36-
hash = ((hash << 5) ^ (hash >> 27)) ^ bytes[i];
36+
hash = ((hash << 5) ^ (hash >> 27)) ^ static_cast<int8_t>(bytes[i]);
3737
}
3838
return hash;
3939
}

0 commit comments

Comments
 (0)