From 3901e7f15c4a9b255c848a6bbd821bd059e0b39e Mon Sep 17 00:00:00 2001 From: Jan Steemann Date: Fri, 19 Dec 2014 11:14:29 +0100 Subject: [PATCH] ensure signedness of data --- lib/Basics/json-utilities.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Basics/json-utilities.cpp b/lib/Basics/json-utilities.cpp index caaa62b5f0..2cf661d2bd 100644 --- a/lib/Basics/json-utilities.cpp +++ b/lib/Basics/json-utilities.cpp @@ -758,7 +758,7 @@ static uint64_t HashBlock (uint64_t hash, char const* buffer, size_t length) { nMagicPrime = 0x00000100000001b3ULL; for (j = 0; j < length; ++j) { - hash ^= buffer[j]; + hash ^= ((int8_t const*) buffer)[j]; hash *= nMagicPrime; } return hash;