This iterator should count down, not up

pull/254/head
Michael Richters 7 years ago
parent 154f0f3267
commit 34cea2623d

@ -122,7 +122,7 @@ Layer_::updateActiveLayers(void) {
void Layer_::updateHighestLayer(void) {
// If layer_count is set, start there, otherwise search from the
// highest possible layer for the top active layer
for (int8_t i = (layer_count - 1); i > defaultLayer; i++) {
for (int8_t i = (layer_count - 1); i > defaultLayer; i--) {
if (bitRead(LayerState, i)) {
highestLayer = i;
return;

Loading…
Cancel
Save