From e50278a35e043347ba9109aa423e1cb2c36e99d3 Mon Sep 17 00:00:00 2001 From: Michal Srutek Date: Thu, 21 Dec 2023 08:22:19 +0100 Subject: [PATCH] ipv4 split --- flutter_inappwebview_ios/ios/Classes/Util.swift | 4 ++-- flutter_inappwebview_macos/macos/Classes/Util.swift | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/flutter_inappwebview_ios/ios/Classes/Util.swift b/flutter_inappwebview_ios/ios/Classes/Util.swift index 799a4cae..9992ece9 100644 --- a/flutter_inappwebview_ios/ios/Classes/Util.swift +++ b/flutter_inappwebview_ios/ios/Classes/Util.swift @@ -177,10 +177,10 @@ public class Util { } if let ipv4Range = Range(match.range(at: 2), in: address) { let ipv4 = address[ipv4Range] - let ipv4Splitted = ipv4.split(separator: ".") + let ipv4Split = ipv4.split(separator: ".") var ipv4Converted = Array(repeating: "0000", count: 4) for i in 0...3 { - let byte = Int(ipv4Splitted[i])! + let byte = Int(ipv4Split[i])! let hex = ("0" + String(byte, radix: 16)) var offset = hex.count - 3 offset = offset < 0 ? 0 : offset diff --git a/flutter_inappwebview_macos/macos/Classes/Util.swift b/flutter_inappwebview_macos/macos/Classes/Util.swift index bd29316a..bf9d91cc 100644 --- a/flutter_inappwebview_macos/macos/Classes/Util.swift +++ b/flutter_inappwebview_macos/macos/Classes/Util.swift @@ -106,10 +106,10 @@ public class Util { } if let ipv4Range = Range(match.range(at: 2), in: address) { let ipv4 = address[ipv4Range] - let ipv4Splitted = ipv4.split(separator: ".") + let ipv4Split = ipv4.split(separator: ".") var ipv4Converted = Array(repeating: "0000", count: 4) for i in 0...3 { - let byte = Int(ipv4Splitted[i])! + let byte = Int(ipv4Split[i])! let hex = ("0" + String(byte, radix: 16)) var offset = hex.count - 3 offset = offset < 0 ? 0 : offset