read_pack_header: handle signed/unsigned comparison in read result