Skip to content

Range error in for-loop of StoryState.trimWhitespaceFromFunctionEnd() #3

Description

@andrewm-dev

outputStream.count == 1, but outputStream.count - 1 == 0, thus resulting in a range error where the starting value is 1 and the ending value of the range is 0.
See line 1074

Repro:
In Ink story, use a function in your story, call it via a choice and watch the values of functionStartPoint and outputStream.count equal each other, resulting in a) range error after outputStream.count - 1 or b) index out of range error on next line (hit by removing the minus one operation on outputStream.count).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions