diff options
author | R. Belmont <rb6502@users.noreply.github.com> | 2012-02-04 04:46:41 +0000 |
---|---|---|
committer | R. Belmont <rb6502@users.noreply.github.com> | 2012-02-04 04:46:41 +0000 |
commit | 1ea1e84fd91e879df8d6a35cee2ebf240dfd67b9 (patch) | |
tree | e93b665ed3d9bf82b0724943c3062a6ea607ce2f | |
parent | 8196ab3f5e97b7dad8de4fed7b681646e5c37928 (diff) |
fix memory stomp in latest N64 video (nw)
-rw-r--r-- | src/mame/video/n64.c | 4 | ||||
-rw-r--r-- | src/mame/video/rdpspn16.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/mame/video/n64.c b/src/mame/video/n64.c index c926dad6ed3..08668350816 100644 --- a/src/mame/video/n64.c +++ b/src/mame/video/n64.c @@ -1800,7 +1800,7 @@ void N64::RDP::Triangle::compute_cvg_noflip(INT32* majorx, INT32* minorx, INT32* if (length < 0) return; - memset(&m_rdp->Spans[scanline].m_cvg[purgestart], 0, (length + 1) << 2); + memset(&m_rdp->Spans[scanline].m_cvg[purgestart], 0, (length + 1) << 1); for(int i = 0; i < 4; i++) { @@ -1873,7 +1873,7 @@ void N64::RDP::Triangle::compute_cvg_flip(INT32* majorx, INT32* minorx, INT32* m if (length < 0) return; - memset(&m_rdp->Spans[scanline].m_cvg[purgestart], 0, (length + 1) << 2); + memset(&m_rdp->Spans[scanline].m_cvg[purgestart], 0, (length + 1) << 1); for(int i = 0; i < 4; i++) { diff --git a/src/mame/video/rdpspn16.h b/src/mame/video/rdpspn16.h index 051289cd481..2192f7fe2fb 100644 --- a/src/mame/video/rdpspn16.h +++ b/src/mame/video/rdpspn16.h @@ -58,7 +58,7 @@ class Span SpanParam m_a; SpanParam m_z; - UINT16 m_cvg[RDP_CVG_SPAN_MAX]; + UINT16 m_cvg[RDP_CVG_SPAN_MAX+32]; private: void RGBAZClip(int sr, int sg, int sb, int sa, int *sz); |