Skip to content

Commit

Permalink
second incorrect substring
Browse files Browse the repository at this point in the history
  • Loading branch information
smwhr committed Feb 26, 2023
1 parent ad59bc5 commit 91364e7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "inkjs",
"version": "2.2.0",
"version": "2.2.1",
"description": "A javascript port of inkle's ink scripting language (http://www.inklestudios.com/ink/)",
"main": "dist/ink-full.js",
"types": "ink.d.ts",
Expand Down
5 changes: 4 additions & 1 deletion src/engine/StoryState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,10 @@ export class StoryState {
if (tailLastNewlineIdx < str.length - 1) {
let numSpaces = str.length - tailLastNewlineIdx - 1;
let trailingSpaces = new StringValue(
str.substring(tailLastNewlineIdx + 1, numSpaces)
str.substring(
tailLastNewlineIdx + 1,
tailLastNewlineIdx + 1 + numSpaces
)
);
listTexts.push(trailingSpaces);
}
Expand Down

0 comments on commit 91364e7

Please sign in to comment.