mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-14 22:56:12 -04:00
Fix asan/msan bug
PiperOrigin-RevId: 780237506
This commit is contained in:
committed by
Copybara-Service
parent
6a5d39eb59
commit
a2bcb2db27
@@ -27,7 +27,7 @@ std::string ByteUtils::ToFourDigitString(ByteArray& bytes) {
|
||||
int multiplier = 1;
|
||||
int hashCode = 0;
|
||||
|
||||
StreamReader stream_reader{bytes};
|
||||
StreamReader stream_reader{&bytes};
|
||||
while (stream_reader.IsAvailable(1)) {
|
||||
auto byte = stream_reader.ReadInt8().value_or(0);
|
||||
hashCode = (hashCode + byte * multiplier) % kHashBasePrime;
|
||||
|
||||
Reference in New Issue
Block a user