diff options
Diffstat (limited to '')
| -rw-r--r-- | src/input_common/udp/protocol.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/input_common/udp/protocol.cpp b/src/input_common/udp/protocol.cpp index d65069207..16da706d5 100644 --- a/src/input_common/udp/protocol.cpp +++ b/src/input_common/udp/protocol.cpp | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | 9 | ||
| 10 | namespace InputCommon::CemuhookUDP { | 10 | namespace InputCommon::CemuhookUDP { |
| 11 | 11 | ||
| 12 | static const std::size_t GetSizeOfResponseType(Type t) { | 12 | static constexpr std::size_t GetSizeOfResponseType(Type t) { |
| 13 | switch (t) { | 13 | switch (t) { |
| 14 | case Type::Version: | 14 | case Type::Version: |
| 15 | return sizeof(Response::Version); | 15 | return sizeof(Response::Version); |
| @@ -34,7 +34,7 @@ std::optional<Type> Validate(u8* data, std::size_t size) { | |||
| 34 | LOG_DEBUG(Input, "Invalid UDP packet received"); | 34 | LOG_DEBUG(Input, "Invalid UDP packet received"); |
| 35 | return {}; | 35 | return {}; |
| 36 | } | 36 | } |
| 37 | Header header; | 37 | Header header{}; |
| 38 | std::memcpy(&header, data, sizeof(Header)); | 38 | std::memcpy(&header, data, sizeof(Header)); |
| 39 | if (header.magic != SERVER_MAGIC) { | 39 | if (header.magic != SERVER_MAGIC) { |
| 40 | LOG_ERROR(Input, "UDP Packet has an unexpected magic value"); | 40 | LOG_ERROR(Input, "UDP Packet has an unexpected magic value"); |