mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
fix(network): copy all characters
This commit is contained in:
parent
654ceffe19
commit
aab9625182
@ -67,9 +67,7 @@ void waybar::modules::Network::_parseEssid(struct nlattr **bss)
|
|||||||
if (ies_len > hdr_len && ies_len > ies[1] + hdr_len) {
|
if (ies_len > hdr_len && ies_len > ies[1] + hdr_len) {
|
||||||
auto essid_begin = ies + hdr_len;
|
auto essid_begin = ies + hdr_len;
|
||||||
auto essid_end = essid_begin + ies[1];
|
auto essid_end = essid_begin + ies[1];
|
||||||
// Only use printable characters of the current locale
|
std::copy(essid_begin, essid_end, std::back_inserter(_essid));
|
||||||
std::copy_if(essid_begin, essid_end, std::back_inserter(_essid),
|
|
||||||
[](char c) { return isprint(static_cast<unsigned char>(c)); });
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user