diff options
author | Manuel Coenen <manuel@duet3d.com> | 2021-01-20 13:52:09 +0300 |
---|---|---|
committer | Manuel Coenen <manuel@duet3d.com> | 2021-01-20 13:52:09 +0300 |
commit | e0f70c42bc156339d3018b1c6eff03a532266c5a (patch) | |
tree | 0d4a75fd922d59136e2efbab9364157eb965627a /src/Duet3Mini | |
parent | e875fc3c25056b8afeb815b4012c24b347c228b1 (diff) |
Fix nullptr access in LookupPinName
Diffstat (limited to 'src/Duet3Mini')
-rw-r--r-- | src/Duet3Mini/Pins_Duet3Mini.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Duet3Mini/Pins_Duet3Mini.cpp b/src/Duet3Mini/Pins_Duet3Mini.cpp index 4acf87c2..500f8051 100644 --- a/src/Duet3Mini/Pins_Duet3Mini.cpp +++ b/src/Duet3Mini/Pins_Duet3Mini.cpp @@ -30,6 +30,10 @@ bool LookupPinName(const char *pn, LogicalPin &lpin, bool &hardwareInverted) noe for (size_t lp = 0; lp < ARRAY_SIZE(PinTable); ++lp) { const char *q = PinTable[lp].pinNames; + if (q == nullptr) + { + continue; + } while (*q != 0) { // Try the next alias in the list of names for this pin |