jozefizso / putty-tunnel-manager

Automatically exported from code.google.com/p/putty-tunnel-manager
MIT License
3 stars 1 forks source link

PTM crashes on right click in windows 8 (Error parsing string to int) #20

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run putty tunnel manager on Windows 8
2. Right click on Icon

What is the expected output? What do you see instead?
Expect: Menu to choose the tunnel to connect to
Get: System.FormatException: Input string was not in a correct format.
     Triggered on line 91 in Tunnel.cs (int sourcePort = Int32.Parse(parts[0]))
     Appears that it fails when parts[0] includes a leter character at the start - which is everytime

What version of the product are you using? On what operating system?
Windows 8 and PTM 0.9.1

Please provide any additional information below.
Fix I have managed to come up with is to replace line 91 with

int sourcePort = Int32.Parse(parts[0].TrimStart(new char[] { 'D','L','R' }));

Original issue reported on code.google.com by o.powles...@gmail.com on 19 May 2013 at 6:43