From 39512da74e0f52faa8730d4591d1a62fe497f253 Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Tue, 21 Jan 2025 19:58:37 +0100 Subject: [PATCH] fix reproduction in game of life A typo caused broken counting of the most common color in neighbouring cells and blocked reproduction in some directions. --- wled00/FX.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wled00/FX.cpp b/wled00/FX.cpp index 1459c4a0f..0ada5f28e 100644 --- a/wled00/FX.cpp +++ b/wled00/FX.cpp @@ -5137,7 +5137,7 @@ uint16_t mode_2Dgameoflife(void) { // Written by Ewoud Wijma, inspired by https: neighbors++; bool colorFound = false; int k; - for (k=0; k<9 && colorsCount[i].count != 0; k++) + for (k=0; k<9 && colorsCount[k].count != 0; k++) if (colorsCount[k].color == prevLeds[xy]) { colorsCount[k].count++; colorFound = true;