diff options
| author | bunnei <bunneidev@gmail.com> | 2022-09-02 10:24:32 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-02 10:24:32 -0700 |
| commit | 5addff8d59dbafb96af02319c24e3e162296336d (patch) | |
| tree | af3d99b89ec3cf093e940eff2d9d8cb31e4faec8 /src/core/hle/service/ldn | |
| parent | 199f77b92f6e0f47844e44dcc5ef1f4dc299824c (diff) | |
| parent | 65718e2876374aecf2ac29856387dab4394ca47f (diff) | |
Merge pull request #8822 from FearlessTobi/multiplayer-fixes
network: Fixes and improvements to the room feature
Diffstat (limited to 'src/core/hle/service/ldn')
| -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"); |
