Skip to content

Commit

Permalink
Fix: Pin I/O label numbering
Browse files Browse the repository at this point in the history
Merge commit ed8b3e0 from pull request Logisim-Ita#37 Matt345Fire/Logisim-Locale

Update Analyze.java
  • Loading branch information
Matt345Fire authored and LucaCaruso-dev committed Nov 19, 2024
1 parent ec57830 commit 7f89830
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ public int compare(Instance ac, Instance bc) {
* throw new AnalyzeException.Conflict(); } } expressionMap.put(p2, e); } } } }
*/

// Metodo che controlla il nome delle etichette (specialmente per l'analizza circuito)
private static String toValidLabel(String label) {
if (label == null)
return null;
Expand Down Expand Up @@ -331,9 +332,12 @@ private static String toValidLabel(String label) {
}
}
if (end != null && ret.length() > 0)
ret.append(end.toString());
if (ret.length() == 0)
ret.append(end);
if (ret.length() == 0 && end != null) {
return end.toString();
} else if(ret.length() == 0) {
return null;
}
return ret.toString();
}

Expand Down

0 comments on commit 7f89830

Please sign in to comment.