Skip to content

Leading minus signs throw ArgumentOutOfRangeException #21

@henryfailbetter

Description

@henryfailbetter

Hi, I had a problem with the parser where expressions with leading minus signs threw an out of range exception. Apologies if this format is not supported.

The expression in question was "-(3+2+1+6)/4".

System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource) at System.Collections.Generic.List1.get_Item(Int32 index) at Mathos.Parser.MathParser.BasicArithmeticalExpression(List1 tokens) at Mathos.Parser.MathParser.MathParserLogic(List1 tokens) at Mathos.Parser.MathParser.Parse(String mathExpression) at ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions