From ccfbb6d7671544acee6381dea403aae598d07b94 Mon Sep 17 00:00:00 2001 From: mesheets <16882600+mesheets@users.noreply.github.com> Date: Wed, 10 Jul 2024 22:13:12 -0400 Subject: [PATCH] Cleanup conditionals for potential future connection type expansion brickOS-bibo supports more connection types --- rcxlib/RCX_Link.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rcxlib/RCX_Link.cpp b/rcxlib/RCX_Link.cpp index 00eaf93..3913f12 100644 --- a/rcxlib/RCX_Link.cpp +++ b/rcxlib/RCX_Link.cpp @@ -150,8 +150,9 @@ RCX_Result RCX_Link::Open(RCX_TargetType target, const char *portName, ULong opt gUSB = false; if (portName) { // strip off "serial:" prefix if present - devName = CheckPrefix(portName, "serial"); - if (!devName) devName = portName; + if ((devName = CheckPrefix(portName, "serial")) != 0) {} + // strip off "com:" prefix if present + else if (!devName) { devName = portName; } } else { devName = PSerial::GetDefaultName();