Today, I found a bug in that 100+-cset series I've just pulled
onto master. One of my own doing, from back in 2007.
Here's the fix and a test case to exercise it.
Without this patch, the following parted command
(from the test) would infloop:
dd if=/dev/null of=f bs=1 seek=1M && mkswap f
parted -s f mklabel msdos