From d62c1fd84a7ad67a5c77d78aaa4583606d46db5b Mon Sep 17 00:00:00 2001 From: Roopesh Chander Date: Thu, 1 Nov 2018 15:53:10 +0530 Subject: [PATCH] VPN: TunnelsManager: Fix deletion code --- WireGuard/WireGuard/VPN/TunnelsManager.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WireGuard/WireGuard/VPN/TunnelsManager.swift b/WireGuard/WireGuard/VPN/TunnelsManager.swift index 73c7336..7c942ad 100644 --- a/WireGuard/WireGuard/VPN/TunnelsManager.swift +++ b/WireGuard/WireGuard/VPN/TunnelsManager.swift @@ -213,7 +213,7 @@ class TunnelsManager { } if let s = self { for i in ((tunnelIndex + 1) ..< s.tunnels.count) { - s.tunnels[i].index = s.tunnels[i].index + 1 + s.tunnels[i].index = s.tunnels[i].index - 1 } s.tunnels.remove(at: tunnelIndex) s.tunnelNames.remove(tunnelName)