Skip to content

ArgumentOutOfRangeException: The index is not in the range #45

@FoggyFinder

Description

@FoggyFinder

To Reproduce
Steps to reproduce the behavior:

  1. Call NthRoot
  2. Type 1
  3. Type 2
  4. Type -
  5. Type x
  6. Click near x
  7. Exception

Expected behavior
Exception is not thrown.

Additional context
Atoms inside of a degree are "fused", so "12 - x" is stored only as three atoms:

{Ordinary 12}
{Binary Operator −}
{Ordinary 𝑥}

And here is lines in the MathListIndexToStringIndex function from where exception comes:

if (mlIndex >= self.Atoms.Length)
        throw ArgOutOfRange($"The index is not in the range {self.Atoms.Length}", mlIndex, nameof(mlIndex));

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions