1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-01-15 07:54:13 +00:00

Correct unsequenced modification and access to 'base'

This commit is contained in:
Nick Briggs 2017-05-28 21:38:51 -07:00
parent fe2014d064
commit 203d02caed

View File

@ -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);