Skip to content

Commit de5d10c

Browse files
committed
PluggableDiscovery: take into account properties without suffix
1 parent 976cd55 commit de5d10c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

arduino-core/src/cc/arduino/packages/BoardPort.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,11 +169,13 @@ public boolean matchesBoard(TargetBoard board) {
169169
// so we must search starting from suffix ".0" and increasing until we
170170
// found a match or the board has no more identification properties defined
171171

172-
for (int suffix = 0;; suffix++) {
172+
for (int suffix = -1;; suffix++) {
173173
boolean found = true;
174174
for (String prop : identificationProps.keySet()) {
175175
String value = identificationProps.get(prop);
176-
prop += "." + suffix;
176+
if (suffix >= 0) {
177+
prop += "." + suffix;
178+
}
177179
if (!boardProps.containsKey(prop)) {
178180
return false;
179181
}

0 commit comments

Comments
 (0)