Skip to content

Commit 114130f

Browse files
committed
PluggableDiscovery: fix namer bailing out early
1 parent c0231bb commit 114130f

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,7 +169,7 @@ 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 = -1;; suffix++) {
172+
for (int suffix = -1; suffix < 10; suffix++) {
173173
boolean found = true;
174174
for (String prop : identificationProps.keySet()) {
175175
String value = identificationProps.get(prop);
@@ -181,7 +181,8 @@ public boolean matchesBoard(TargetBoard board) {
181181
break;
182182
}
183183
if (!boardProps.containsKey(prop)) {
184-
return false;
184+
found = false;
185+
break;
185186
}
186187
if (!value.equalsIgnoreCase(boardProps.get(prop))) {
187188
found = false;
@@ -192,6 +193,7 @@ public boolean matchesBoard(TargetBoard board) {
192193
return true;
193194
}
194195
}
196+
return false;
195197
}
196198

197199
}

0 commit comments

Comments
 (0)