Skip to content

Commit

Permalink
Fix: compiler throws an error when wanaddr is not used
Browse files Browse the repository at this point in the history
  • Loading branch information
Monsterovich authored and past-due committed Nov 1, 2024
1 parent d3d2d55 commit 111ef8a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/netplay/port_mapping_manager_impl_miniupnpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ static PortMappingImpl_Miniupnpc::DiscoveryStatus upnp_discover(DiscoveryResults
return PortMappingImpl_Miniupnpc::DiscoveryStatus::UPNP_ERROR_DEVICE_NOT_FOUND;
}

char wanaddr[64] = {};
#if defined(MINIUPNPC_API_VERSION) && (MINIUPNPC_API_VERSION >= 18)
char wanaddr[64] = {};
int validIGDResult = UPNP_GetValidIGD(devlist, &output.urls, &output.data, output.lanaddr, sizeof(output.lanaddr), wanaddr, sizeof(wanaddr));
#else
int validIGDResult = UPNP_GetValidIGD(devlist, &output.urls, &output.data, output.lanaddr, sizeof(output.lanaddr));
Expand Down

0 comments on commit 111ef8a

Please sign in to comment.