fixed graphical VGA 16 color mode - fixed 9 pixel wide text mode
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@345 c046a42c-6fe2-441c-8c8c-71466251a162
diff --git a/hw/vga_template.h b/hw/vga_template.h
index dd6581e..2f658b4 100644
--- a/hw/vga_template.h
+++ b/hw/vga_template.h
@@ -84,9 +84,9 @@
v = (dmask16[(font_data >> 0) & 0xf] & xorcol) ^ bgcol;
((uint32_t *)d)[3] = v;
if (dup9)
- *(uint8_t *)(d + 8) = v >> (24 * (1 - BIG));
+ ((uint8_t *)d)[8] = v >> (24 * (1 - BIG));
else
- *(uint8_t *)(d + 8) = bgcol;
+ ((uint8_t *)d)[8] = bgcol;
#elif BPP == 2
((uint32_t *)d)[0] = (dmask4[(font_data >> 6)] & xorcol) ^ bgcol;
@@ -95,9 +95,9 @@
v = (dmask4[(font_data >> 0) & 3] & xorcol) ^ bgcol;
((uint32_t *)d)[3] = v;
if (dup9)
- *(uint16_t *)(d + 8) = v >> (16 * (1 - BIG));
+ ((uint16_t *)d)[8] = v >> (16 * (1 - BIG));
else
- *(uint16_t *)(d + 8) = bgcol;
+ ((uint16_t *)d)[8] = bgcol;
#else
((uint32_t *)d)[0] = ((-(font_data >> 7)) & xorcol) ^ bgcol;
((uint32_t *)d)[1] = ((-(font_data >> 6) & 1) & xorcol) ^ bgcol;
@@ -109,9 +109,9 @@
v = ((-(font_data >> 0) & 1) & xorcol) ^ bgcol;
((uint32_t *)d)[7] = v;
if (dup9)
- *(uint32_t *)(d + 8) = v;
+ ((uint32_t *)d)[8] = v;
else
- *(uint32_t *)(d + 8) = bgcol;
+ ((uint32_t *)d)[8] = bgcol;
#endif
font_ptr += 4;
d += linesize;