Allow for escaped COM ports like \\.\COM3

https://github.com/Hamlib/Hamlib/issues/337
pull/345/head
Michael Black W9MDB 2020-07-04 12:37:26 -05:00
rodzic 41230fabc2
commit 65eab6c430
1 zmienionych plików z 3 dodań i 0 usunięć

Wyświetl plik

@ -1392,6 +1392,9 @@ int HAMLIB_API parse_hoststr(char *hoststr, char host[256], char port[6])
if (strncasecmp(hoststr, "com", 3) == 0) { return -1; }
// escaped COM port like \\.\COM3
if (strstr(hoststr,"\\")) { return -1; }
// bracketed IPV6 with optional port
int n = sscanf(hoststr, "[%255[^]]]:%5s", host, port);