}
}
assert(encp < encoded + COMMAND_ENCODED_MAX);
- *encp++= (working >> 8) & 0xfe; /* top 7 bits, shifted left one */
+ *encp++= (working >> 9) & 0x7f; /* top 7 bits, right-justified */
working <<= 7;
working_qty -= 7;
}
assert(encp > encoded);
- encp[-1] |= 0x01; /* `end of command' bit */
+ encp[-1] |= 0x80; /* `end of command' bit */
command_transmit(encoded, encp - encoded);
}