From 2080e19b66526d1c5f5f9fabd98e09cbb24c482f Mon Sep 17 00:00:00 2001 From: mightymax 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 --- trunk/desmume/src/GPU.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/trunk/desmume/src/GPU.h b/trunk/desmume/src/GPU.h index 31899b628..1363b08bb 100644 --- a/trunk/desmume/src/GPU.h +++ b/trunk/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 {