Game of Life Change

Removed sizeof(byte)
This commit is contained in:
Brandon502
2024-05-11 17:03:58 -04:00
parent 86a18ce6c2
commit 6d2fc5040c

View File

@@ -5166,7 +5166,7 @@ uint16_t mode_2Dgameoflife(void) { // Written by Ewoud Wijma, inspired by https:
const uint16_t cols = SEGMENT.virtualWidth();
const uint16_t rows = SEGMENT.virtualHeight();
const uint16_t dataSize = sizeof(byte) * SEGMENT.length()/8; // using width*height prevents reallocation if mirroring is enabled
const uint16_t dataSize = SEGMENT.length() / 8;
const uint16_t totalSize = dataSize*2 + sizeof(gameOfLife);
if (!SEGENV.allocateData(totalSize)) return mode_static(); //allocation failed