diff --git a/common/partitions.c b/common/partitions.c index cee0a65..0e42937 100644 --- a/common/partitions.c +++ b/common/partitions.c @@ -52,8 +52,8 @@ for (i = 0; i < 4; i++) { if (table[i].partition_start != 0) { - size += get_unaligned(&table[i].partition_start) - size; - size += get_unaligned(&table[i].partition_size); + size += get_unaligned_le32(&table[i].partition_start) - size; + size += get_unaligned_le32(&table[i].partition_size); } } @@ -97,8 +97,8 @@ blk->num_blocks = disk_guess_size(blk->dev, table); for (i = 0; i < 4; i++) { - pentry.first_sec = get_unaligned(&table[i].partition_start); - pentry.size = get_unaligned(&table[i].partition_size); + pentry.first_sec = get_unaligned_le32(&table[i].partition_start); + pentry.size = get_unaligned_le32(&table[i].partition_size); if (pentry.first_sec != 0) { pd->parts[pd->used_entries].first_sec = pentry.first_sec;