chiark / gitweb /
Don't overallocate colour memory in Loopy.
authorJonas Kölker <jonaskoelker@yahoo.com>
Mon, 21 Sep 2015 14:24:10 +0000 (16:24 +0200)
committerSimon Tatham <anakin@pobox.com>
Sat, 3 Oct 2015 15:58:05 +0000 (16:58 +0100)
loopy.c

diff --git a/loopy.c b/loopy.c
index bf503cef25db18273fffcafd639f0ac6c3d474b7..b594902976246348581957ac6e93a59448a07145 100644 (file)
--- a/loopy.c
+++ b/loopy.c
@@ -850,7 +850,7 @@ static void game_set_size(drawing *dr, game_drawstate *ds,
 
 static float *game_colours(frontend *fe, int *ncolours)
 {
-    float *ret = snewn(4 * NCOLOURS, float);
+    float *ret = snewn(3 * NCOLOURS, float);
 
     frontend_default_colour(fe, &ret[COL_BACKGROUND * 3]);