فهرست منبع

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
         }
     }