From 8366f6cb5e143cf889c6115c3117e7bf09ef7c84 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 28 Mar 2018 21:44:54 -0400 Subject: [PATCH] citra-room: Fix always false case in main() related to port range If the variable we're checking is a u16, then there can never be values outside of the 0-65535 range. This is bad because an arbitrary larger value can be truncated down into a valid value, making an otherwise malformed argument well-formed. Change it to use u32 to allow the check to function properly. --- src/dedicated_room/citra-room.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dedicated_room/citra-room.cpp b/src/dedicated_room/citra-room.cpp index 5388b3782e..370098af58 100644 --- a/src/dedicated_room/citra-room.cpp +++ b/src/dedicated_room/citra-room.cpp @@ -69,7 +69,7 @@ int main(int argc, char** argv) { std::string token; std::string announce_url; u64 preferred_game_id = 0; - u16 port = Network::DefaultRoomPort; + u32 port = Network::DefaultRoomPort; u32 max_members = 16; static struct option long_options[] = {