Skip to content

Commit

Permalink
fix(darwin, linux): Fixed unescapeAscii functions.
Browse files Browse the repository at this point in the history
Fixed #70.
  • Loading branch information
Skyost committed Nov 27, 2023
1 parent e67f698 commit 314df41
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,8 @@ class BonsoirServiceDiscovery: BonsoirAction {
}

/// Allows to unescape services FQDN.
private static func unescapeAscii(_ input: String) -> String {
private static func unescapeAscii(_ inputString: String) -> String {
let input = inputString.replacingOccurrences(of: "\\.", with: ".")
var result = ""
var i = 0
while i < input.count {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ class AvahiBonsoirDiscovery extends AvahiBonsoirAction<BonsoirDiscoveryEvent> wi

/// Allows to unescape services FQDN.
String _unescapeAscii(String input) {
input = input.replaceAll('\\.', '.');
String result = '';
for (int i = 0; i < input.length; i++) {
if (input[i] == '\\' && i + 1 < input.length) {
Expand Down

0 comments on commit 314df41

Please sign in to comment.