summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--block-qcow2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block-qcow2.c b/block-qcow2.c
index 5f0fbe8..693cd77 100644
--- a/block-qcow2.c
+++ b/block-qcow2.c
@@ -917,7 +917,7 @@ static uint64_t alloc_cluster_offset(BlockDriverState *bs,
/* how many free clusters ? */
while (i < nb_clusters) {
- cluster_offset = l2_table[l2_index + i];
+ cluster_offset = be64_to_cpu(l2_table[l2_index + i]);
if (cluster_offset != 0)
break;
i++;
OpenPOWER on IntegriCloud