From 4907b84a84548349e1b015cc6b877c9e708a24fe Mon Sep 17 00:00:00 2001 From: jacob1 Date: Thu, 29 Dec 2022 23:56:30 -0500 Subject: [PATCH] Fix white LIFE being created in some cases, such as from EXOT+NEUT The default for v is -1, which gets interpreted as a GoL rule with all bits set. Now, it will default to builtin-type GOL when v is -1. --- src/simulation/elements/LIFE.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/simulation/elements/LIFE.cpp b/src/simulation/elements/LIFE.cpp index b64b101f1..2e28ee262 100644 --- a/src/simulation/elements/LIFE.cpp +++ b/src/simulation/elements/LIFE.cpp @@ -91,6 +91,8 @@ static int graphics(GRAPHICS_FUNC_ARGS) static void create(ELEMENT_CREATE_FUNC_ARGS) { + if (v == -1) + v = 0; // * 0x200000: No need to look for colours, they'll be set later anyway. bool skipLookup = v & 0x200000; v &= 0x1FFFFF;