Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
andrewm-dev opened this issue Dec 9, 2023 · 1 comment

Comments

@andrewm-dev
Copy link

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).

@andrewm-dev
Copy link
Author

I have tried to identify where the whitespace is in the ink file that is causing this method to be called, yet, I have been unable to, despite removing all whitespaces in the function signature and as many whitespaces as I can in the Ink file in general. Still, no avail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant