From 5959a8655c2516883ca9d1a70f18973b75d35059 Mon Sep 17 00:00:00 2001 From: peteGSX <97784652+peteGSX@users.noreply.github.com> Date: Thu, 18 Jan 2024 13:33:47 +1000 Subject: [PATCH] EX-IO digital buffer size correction --- IO_EXIOExpander.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IO_EXIOExpander.h b/IO_EXIOExpander.h index ca67319..5e7a1e9 100644 --- a/IO_EXIOExpander.h +++ b/IO_EXIOExpander.h @@ -105,8 +105,8 @@ private: if (_digitalPinBytes < digitalBytesNeeded) { // Not enough space, free any existing buffer and allocate a new one if (_digitalPinBytes > 0) free(_digitalInputStates); - _digitalInputStates = (byte*) calloc(_digitalPinBytes, 1); _digitalPinBytes = digitalBytesNeeded; + _digitalInputStates = (byte*) calloc(_digitalPinBytes, 1); } }