> +    if (packed_bit != 0) {
> +        /* last chunk was not finished, so finish it now */
> +        buf[buf_byte++] = packed_cur;
> +    }
>

Although current payloads end with a FIELD_VAR, so this path is normally
bypassed, a message ending with a partial fixed field would reach it.
packed_cur must be shifted into the MDO bits before setting MSEO; otherwise
the MSEO update overwrites its lower data bits.
buf[buf_byte++] = packed_cur << MSEO_BITS_NUM;

Thanks
Jay Chang

Reply via email to