From 575bd890e7abb21e24675f31e0e4090cf76bda3a Mon Sep 17 00:00:00 2001 From: Franklin Wei Date: Sun, 18 Dec 2016 12:51:10 -0500 Subject: work around little bugs in puzzles Change-Id: I80d72a6bb0189eb842385aa622506d5efe319053 --- apps/plugins/puzzles/SOURCES.games | 2 ++ apps/plugins/puzzles/misc.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'apps') diff --git a/apps/plugins/puzzles/SOURCES.games b/apps/plugins/puzzles/SOURCES.games index 6ecfdc76f4..d228138528 100644 --- a/apps/plugins/puzzles/SOURCES.games +++ b/apps/plugins/puzzles/SOURCES.games @@ -19,7 +19,9 @@ net.c netslide.c /*palisade.c*/ pattern.c +#if PLUGIN_BUFFER_SIZE > 0x20000 pearl.c +#endif pegs.c range.c rect.c diff --git a/apps/plugins/puzzles/misc.c b/apps/plugins/puzzles/misc.c index caf52cd520..cd5c393b95 100644 --- a/apps/plugins/puzzles/misc.c +++ b/apps/plugins/puzzles/misc.c @@ -201,7 +201,7 @@ void game_mkhighlight(frontend *fe, float *ret, game_mkhighlight_specific(fe, ret, background, highlight, lowlight); } -static void memswap(void *av, void *bv, int size) +static void memswap_puzzles(void *av, void *bv, int size) { char tmpbuf[512]; char *a = av, *b = bv; @@ -225,7 +225,7 @@ void shuffle(void *array, int nelts, int eltsize, random_state *rs) for (i = nelts; i-- > 1 ;) { int j = random_upto(rs, i+1); if (j != i) - memswap(carray + eltsize * i, carray + eltsize * j, eltsize); + memswap_puzzles(carray + eltsize * i, carray + eltsize * j, eltsize); } } -- cgit v1.2.3