The last bit of a scan is clocked during TAP movement so it's necessary
for the last field to have at least one bit. Strip trailing empty fields
and make sure the TAP is not affected if there's nothing to scan. Clients
probably shouldn't add empty fields so add a debug message to be able to
track and fix them.
Signed-off-by: Andreas Fritiofson <firstname.lastname@example.org>
Reviewed-by: Spencer Oliver <email@example.com>
Reviewed-by: Freddie Chopin <firstname.lastname@example.org>