diff options
author | bunnei <bunneidev@gmail.com> | 2022-09-02 19:24:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-02 19:24:32 +0200 |
commit | 5addff8d59dbafb96af02319c24e3e162296336d (patch) | |
tree | af3d99b89ec3cf093e940eff2d9d8cb31e4faec8 /src/core/hle/service/ldn/ldn_types.h | |
parent | Merge pull request #8843 from Kelebek1/SILENCE_WENCH (diff) | |
parent | Address review comments (diff) | |
download | yuzu-5addff8d59dbafb96af02319c24e3e162296336d.tar yuzu-5addff8d59dbafb96af02319c24e3e162296336d.tar.gz yuzu-5addff8d59dbafb96af02319c24e3e162296336d.tar.bz2 yuzu-5addff8d59dbafb96af02319c24e3e162296336d.tar.lz yuzu-5addff8d59dbafb96af02319c24e3e162296336d.tar.xz yuzu-5addff8d59dbafb96af02319c24e3e162296336d.tar.zst yuzu-5addff8d59dbafb96af02319c24e3e162296336d.zip |
Diffstat (limited to 'src/core/hle/service/ldn/ldn_types.h')
-rw-r--r-- | src/core/hle/service/ldn/ldn_types.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/core/hle/service/ldn/ldn_types.h b/src/core/hle/service/ldn/ldn_types.h index 0c07a7397..6231e936d 100644 --- a/src/core/hle/service/ldn/ldn_types.h +++ b/src/core/hle/service/ldn/ldn_types.h @@ -113,7 +113,7 @@ enum class LinkLevel : s8 { Bad, Low, Good, - Excelent, + Excellent, }; struct NodeLatestUpdate { @@ -145,11 +145,19 @@ struct NetworkId { static_assert(sizeof(NetworkId) == 0x20, "NetworkId is an invalid size"); struct Ssid { - u8 length; - std::array<char, SsidLengthMax + 1> raw; + u8 length{}; + std::array<char, SsidLengthMax + 1> raw{}; + + Ssid() = default; + + explicit Ssid(std::string_view data) { + length = static_cast<u8>(std::min(data.size(), SsidLengthMax)); + data.copy(raw.data(), length); + raw[length] = 0; + } std::string GetStringValue() const { - return std::string(raw.data(), length); + return std::string(raw.data()); } }; static_assert(sizeof(Ssid) == 0x22, "Ssid is an invalid size"); |