citra-emu
/
citra
Archived
1
0
Fork 0

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.
This commit is contained in:
Lioncash 2018-03-28 21:44:54 -04:00
parent 74465389f3
commit 8366f6cb5e
1 changed files with 1 additions and 1 deletions

View File

@ -69,7 +69,7 @@ int main(int argc, char** argv) {
std::string token; std::string token;
std::string announce_url; std::string announce_url;
u64 preferred_game_id = 0; u64 preferred_game_id = 0;
u16 port = Network::DefaultRoomPort; u32 port = Network::DefaultRoomPort;
u32 max_members = 16; u32 max_members = 16;
static struct option long_options[] = { static struct option long_options[] = {