瀏覽代碼

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

Miguel de Icaza 3 年之前
父節點
當前提交
df866bc444
共有 1 個文件被更改,包括 2 次插入1 次删除
  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
         }
     }