From cb296a66606aaefd87b77bd089eba527d88569a1 Mon Sep 17 00:00:00 2001 From: Braden Obrzut Date: Tue, 7 Aug 2012 20:09:07 +0000 Subject: [PATCH] - Fixed: Valgrind error when copying the FON2 palettes. SVN r3812 (trunk) --- src/v_font.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/v_font.cpp b/src/v_font.cpp index 176b5097d..c1923e4ac 100644 --- a/src/v_font.cpp +++ b/src/v_font.cpp @@ -1125,7 +1125,7 @@ void FSingleLumpFont::LoadFON2 (int lump, const BYTE *data) SpaceWidth = totalwidth * 2 / (3 * count); } - memcpy(PaletteData, palette, 768); + memcpy(PaletteData, palette, (ActiveColors+1)*3); data_p = palette + (ActiveColors+1)*3;