From aa40231ac75500794c511500e3ed2a51400cddce Mon Sep 17 00:00:00 2001 From: Asbelos Date: Fri, 17 Dec 2021 21:19:16 +0000 Subject: [PATCH] catch bad param count in F --- DCCEXParser.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/DCCEXParser.cpp b/DCCEXParser.cpp index 0b4d661..0266e49 100644 --- a/DCCEXParser.cpp +++ b/DCCEXParser.cpp @@ -540,6 +540,7 @@ void DCCEXParser::parse(Print *stream, byte *com, RingStream * ringStream) return; case 'F': // New command to call the new Loco Function API + if(params!=3) break; if (Diag::CMD) DIAG(F("Setting loco %d F%d %S"), p[0], p[1], p[2] ? F("ON") : F("OFF")); DCC::setFn(p[0], p[1], p[2] == 1);