shorten: Fix out of bound writes in fix_bitshift()