From c950ca35d8de06b761fb7e433376f693e313fb55 Mon Sep 17 00:00:00 2001
From: mightymax <mightymax@users.sf.net>
Date: Wed, 10 Jan 2007 15:09:18 +0000
Subject: [PATCH] fixed wrong optimized sizeof(COLOR) [is 4 instead of 2]
 caused overwriting unrelated data

---
 desmume/src/GPU.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/desmume/src/GPU.h b/desmume/src/GPU.h
index 31899b628..1363b08bb 100644
--- a/desmume/src/GPU.h
+++ b/desmume/src/GPU.h
@@ -423,7 +423,7 @@ static INLINE void GPU_ligne(Screen * screen, u16 l)
 			{
 				/* the formular would create only white, as (r + (31-r)) = 31 */
 				/* white = enable all bits */
-				memset(dst,0xFF, 256*sizeof(COLOR)) ;
+				memset(dst,0xFF, 256*2 /* sizeof(COLOR) */) ;
 			} else
 			{
 
@@ -463,7 +463,7 @@ static INLINE void GPU_ligne(Screen * screen, u16 l)
 			{
 				/* the formular would create only black, as (r - r) = 0 */
 				/* black = disable all bits */
-				memset(dst,0, 256*sizeof(COLOR)) ;
+				memset(dst,0, 256*2 /* sizeof(COLOR) */) ;
 			} else
 			{