It gets thrown when the baseUrl in ParseResponse is "http://192.168.0.12:9080". The issue is caused in line 227. The code is trying to find the first slash after the http:// and fails to accomodate for the case when there is none by subsequently calling
mGatewayURL = baseURL.Substring(0, offset);
with an offset of -1.
I hope posting one line of proprietary source does not get me banned. :-P
Title: Re: Bug in TNUPnP.cs (ParseResponse)
Post by: cmifwdll on September 01, 2017, 05:44:12 PM
int offset = baseURL.IndexOf("://");
int endOffset = baseURL.IndexOf('/', offset +3);
if(endOffset >0)
mGatewayURL = baseURL.Substring(0, endOffset);
else
mGatewayURL = baseURL;
I'm sure you've already fixed it, but posting the fix here for ArenMook.
Title: Re: Bug in TNUPnP.cs (ParseResponse)
Post by: ArenMook on September 06, 2017, 12:48:22 AM