Fixed infinite loop

Fixed infinite loop when generating disk partitions for Windows XML
files