[Spice-devel] [PATCH] server/red_worker: fix dump_bitmap (disabled unless DUMP_BITMAP is defined)

Hans de Goede hdegoede at redhat.com
Mon Apr 4 10:04:43 PDT 2011


Ack.

On 04/04/2011 06:58 PM, Alon Levy wrote:
> ---
>   server/red_worker.c |    5 +++--
>   1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/server/red_worker.c b/server/red_worker.c
> index f163a71..dce1313 100644
> --- a/server/red_worker.c
> +++ b/server/red_worker.c
> @@ -10347,6 +10347,7 @@ static void dump_bitmap(RedWorker *worker, SpiceBitmap *bitmap, uint32_t group_i
>       uint16_t tmp_u16;
>       FILE *f;
>       int i;
> +    int j;
>
>       switch (bitmap->format) {
>       case SPICE_BITMAP_FMT_1BIT_BE:
> @@ -10442,8 +10443,8 @@ static void dump_bitmap(RedWorker *worker, SpiceBitmap *bitmap, uint32_t group_i
>       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);


More information about the Spice-devel mailing list