Commit 74757c8b authored by Lev Walkin's avatar Lev Walkin

avoid shifting negative value

parent a6040115
......@@ -162,7 +162,7 @@ OBJECT_IDENTIFIER_get_single_arc(const uint8_t *arcbuf, unsigned int arclen, sig
if(add) {
for(rvbuf -= inc; rvbuf != rvstart; rvbuf -= inc) {
int v = add + *rvbuf;
if(v & (-1 << CHAR_BIT)) {
if(v & ((unsigned)~0 << CHAR_BIT)) {
*rvbuf = (unsigned char)(v + (1 << CHAR_BIT));
add = -1;
} else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment