Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: startIndex

来源:互联网 发布:linux将文件夹压缩 编辑:程序博客网 时间:2024/04/28 14:27

在下载安装poderosa后 连接 cygwin时出现以下问题

Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: startIndex

 

解决方案

 

下载poderosa 源代码,

将其中 LocalShell.cs 中

                char[] buf = new char[8192];
                int n = Win32.GetEnvironmentVariable("PATH", buf, buf.Length);

改为

                char[] buf = new char[8192];
                int n = Win32.GetEnvironmentVariable("PATH", buf, buf.Length);

 

就Okay了

 

问题原因 PATH太长了

原创粉丝点击