mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-27 18:16:13 +01:00
EX-IO digital buffer size correction
This commit is contained in:
parent
3462beeeac
commit
5959a8655c
|
@ -105,8 +105,8 @@ private:
|
||||||
if (_digitalPinBytes < digitalBytesNeeded) {
|
if (_digitalPinBytes < digitalBytesNeeded) {
|
||||||
// Not enough space, free any existing buffer and allocate a new one
|
// Not enough space, free any existing buffer and allocate a new one
|
||||||
if (_digitalPinBytes > 0) free(_digitalInputStates);
|
if (_digitalPinBytes > 0) free(_digitalInputStates);
|
||||||
_digitalInputStates = (byte*) calloc(_digitalPinBytes, 1);
|
|
||||||
_digitalPinBytes = digitalBytesNeeded;
|
_digitalPinBytes = digitalBytesNeeded;
|
||||||
|
_digitalInputStates = (byte*) calloc(_digitalPinBytes, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user