diff options
author | Yonit Halperin <yhalperi@redhat.com> | 2013-08-22 16:09:26 -0400 |
---|---|---|
committer | Yonit Halperin <yhalperi@redhat.com> | 2013-08-22 16:09:26 -0400 |
commit | 93b88a73f3852ed87003cbdb21fa3c5e28b3726c (patch) | |
tree | 041da1bcb950bb3cb15ba5ad5fbc480e475bd47a /server | |
parent | ed1f70c6d16ff55adf73a08f063f5d7955f4c488 (diff) | |
download | spice-93b88a73f3852ed87003cbdb21fa3c5e28b3726c.tar.gz spice-93b88a73f3852ed87003cbdb21fa3c5e28b3726c.tar.xz spice-93b88a73f3852ed87003cbdb21fa3c5e28b3726c.zip |
spice_bitmap_utils: fix dump_bitmap
Diffstat (limited to 'server')
-rw-r--r-- | server/spice_bitmap_utils.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/spice_bitmap_utils.c b/server/spice_bitmap_utils.c index ce0a5ed0..7b370a0c 100644 --- a/server/spice_bitmap_utils.c +++ b/server/spice_bitmap_utils.c @@ -63,7 +63,7 @@ void dump_bitmap(SpiceBitmap *bitmap) int32_t tmp_32; uint16_t tmp_u16; FILE *f; - int i; + int i, j; switch (bitmap->format) { case SPICE_BITMAP_FMT_1BIT_BE: @@ -159,8 +159,8 @@ void dump_bitmap(SpiceBitmap *bitmap) for (i = 0; i < bitmap->data->num_chunks; i++) { SpiceChunk *chunk = &bitmap->data->chunk[i]; int num_lines = chunk->len / bitmap->stride; - for (i = 0; i < num_lines; i++) { - dump_line(f, chunk->data + (i * bitmap->stride), n_pixel_bits, bitmap->x, row_size); + for (j = 0; j < num_lines; j++) { + dump_line(f, chunk->data + (j * bitmap->stride), n_pixel_bits, bitmap->x, row_size); } } fclose(f); |