Browse Source

Fix bug introduced recently: if we can not parse a color, we need to move on

Miguel de Icaza 3 years ago
parent
commit
df866bc444
1 changed files with 2 additions and 1 deletions
  1. 2 1
      Sources/SwiftTerm/Terminal.swift

+ 2 - 1
Sources/SwiftTerm/Terminal.swift

@@ -1596,6 +1596,8 @@ open class Terminal {
         let groups = data.split(separator: UInt8 (ascii: ";"))
         var next = 0
         while next < groups.count {
+            defer { next += 1 }
+
             guard let color = Color.parseColor(groups [next]) else {
                 continue
             }
@@ -1613,7 +1615,6 @@ open class Terminal {
             default:
                 break
             }
-            next += 1
         }
     }