From 203d02caed7874537f204957cab9085f106e81f0 Mon Sep 17 00:00:00 2001 From: Nick Briggs Date: Sun, 28 May 2017 21:38:51 -0700 Subject: [PATCH] Correct unsequenced modification and access to 'base' --- src/sxhash.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sxhash.c b/src/sxhash.c index 5c508d1..b41a7ff 100644 --- a/src/sxhash.c +++ b/src/sxhash.c @@ -159,7 +159,8 @@ unsigned short sxhash_bitvec(OneDArray *obj) { if (len < 16) hash = hash >> (16 - len); } else { bitoffset = offset & 15; - hash = (GETWORD(base++) << (bitoffset)) | (GETWORD(base) >> (16 - bitoffset)); + hash = (GETWORD(base++) << (bitoffset)); + hash |= (GETWORD(base) >> (16 - bitoffset)); if ((len - offset) < 16) hash = hash >> (16 - (len - offset)); } return (hash);