From 7954c85b7daae2de9ab894d0b34d0646e5356125 Mon Sep 17 00:00:00 2001 From: Neil McKechnie Date: Tue, 9 Mar 2021 10:27:38 +0000 Subject: [PATCH] Update freeMemory.cpp --- freeMemory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/freeMemory.cpp b/freeMemory.cpp index 500cff8..fd99d5b 100644 --- a/freeMemory.cpp +++ b/freeMemory.cpp @@ -50,9 +50,9 @@ int freeMemory() { // by estimation or inspection, that may be used by other // called subroutines. int updateMinimumFreeMemory(unsigned char extraBytes) { - int spare = freeMemory()-extraBytes; byte sreg_save = SREG; noInterrupts(); + int spare = freeMemory()-extraBytes; if (spare < minimum_free_memory) minimum_free_memory = spare; int returnValue = minimum_free_memory; SREG = sreg_save;