Răsfoiți Sursa

if there are no IOs set as out
put, avoid generating bad tags

Baglio Tabifata 4 ani în urmă
părinte
comite
1277a3ca17
1 a modificat fișierele cu 7 adăugiri și 5 ștergeri
  1. 7 5
      src/net/hkzlab/palanalisys/SubState.java

+ 7 - 5
src/net/hkzlab/palanalisys/SubState.java

@@ -20,11 +20,13 @@ public class SubState {
         StringBuffer strBuf = new StringBuffer();
         strBuf.append(SS_PRE_TAG+tag+"-");
 
-        for(byte pin : pin_status) {
-            if(pin < 0) strBuf.append('x');
-            else if (pin == 0) strBuf.append(0);
-            else strBuf.append(1);
-        }
+        if(pin_status.length > 0) {
+            for(byte pin : pin_status) {
+                if(pin < 0) strBuf.append('x');
+                else if (pin == 0) strBuf.append(0);
+                else strBuf.append(1);
+            }
+        } else strBuf.append("noout");
 
         return strBuf.toString();
     }