fdorg/flashdevelop

Crash: startIndex cannot be larger than length of string.

Closed this issue · 1 comments

FD crashes when trying to type a=".:

package ;

class Foo
{
	var a=".
	public function new()
	{}
}
startIndex cannot be larger than length of string.
Parameter name: startIndex

   at System.String.Substring(Int32 startIndex, Int32 length)
   at ASCompletion.Completion.ASComplete.EvalExpression(String expression, ASExpr context, FileModel inFile, ClassModel inClass, Boolean complete, Boolean asFunction, Boolean filterVisibility) in ...\flashdevelop\External\Plugins\ASCompletion\Completion\ASComplete.cs:line 2532
   at HaXeContext.Completion.CodeComplete.EvalExpression(String expression, ASExpr context, FileModel inFile, ClassModel inClass, Boolean complete, Boolean asFunction, Boolean filterVisibility) in ...\flashdevelop\External\Plugins\HaXeContext\Completion\CodeComplete.cs:line 1316
   at ASCompletion.Completion.ASComplete.EvalExpression(String expression, ASExpr context, FileModel inFile, ClassModel inClass, Boolean complete, Boolean asFunction) in ...\flashdevelop\External\Plugins\ASCompletion\Completion\ASComplete.cs:line 2494
   at ASCompletion.Completion.ASComplete.HandleDotCompletion(ScintillaControl sci, Boolean autoHide, List`1 list, Comparison`1 comparison) in ...\flashdevelop\External\Plugins\ASCompletion\Completion\ASComplete.cs:line 1978
   at ASCompletion.Completion.ASComplete.HandleDotCompletion(ScintillaControl sci, Boolean autoHide) in ...\flashdevelop\External\Plugins\ASCompletion\Completion\ASComplete.cs:line 1864
   at ASCompletion.Completion.ASComplete.OnChar(ScintillaControl sci, Int32 value, Boolean autoHide) in ...\flashdevelop\External\Plugins\ASCompletion\Completion\ASComplete.cs:line 153

FD: c4264e9f73
Haxe: 4.1.5

Regression #2750