From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LNmdw-0004XY-Ia for qemu-devel@nongnu.org; Fri, 16 Jan 2009 06:13:40 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LNmdu-0004X0-C4 for qemu-devel@nongnu.org; Fri, 16 Jan 2009 06:13:39 -0500 Received: from [199.232.76.173] (port=35488 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LNmdu-0004Wu-7P for qemu-devel@nongnu.org; Fri, 16 Jan 2009 06:13:38 -0500 Received: from moutng.kundenserver.de ([212.227.17.10]:51563) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LNmdt-0008Cw-PV for qemu-devel@nongnu.org; Fri, 16 Jan 2009 06:13:38 -0500 Message-Id: <20751876.567371232104405516.JavaMail.servlet@kundenserver> From: laurent@lvivier.info Subject: RE: [Qemu-devel] [6336] DisplayState interface change (StefanoStabellini) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Date: Fri, 16 Jan 2009 12:13:25 +0100 Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org >Revision: 6336 > http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6336 >Author: aliguori >Date: 2009-01-15 22:14:11 +0000 (Thu, 15 Jan 2009) > >Log Message: >----------- >DisplayState interface change (Stefano Stabellini) This patch breaks qemu-system-ppc: in update_palette256(), s->rgb_to_pixel() is used unitialized. update_palette256() is called by vga_draw_graphic() whereas s->rgb_to_pixel() is initialized later in the function. This patch correct the problem. Signed-off-by: Laurent Vivier diff --git a/hw/vga.c b/hw/vga.c index f2d98b0..769faea 100644 --- a/hw/vga.c +++ b/hw/vga.c @@ -1838,6 +1838,7 @@ static void vga_update_display(void *opaque) s->graphic_mode = graphic_mode; full_update = 1; } + s->rgb_to_pixel = rgb_to_pixel_dup_table[get_depth_index(s->ds)]; switch(graphic_mode) { case GMODE_TEXT: vga_draw_text(s, full_update);