Skip to content

Commit 91364e7

Browse files
committed
second incorrect substring
1 parent ad59bc5 commit 91364e7

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "inkjs",
3-
"version": "2.2.0",
3+
"version": "2.2.1",
44
"description": "A javascript port of inkle's ink scripting language (http://www.inklestudios.com/ink/)",
55
"main": "dist/ink-full.js",
66
"types": "ink.d.ts",

src/engine/StoryState.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -827,7 +827,10 @@ export class StoryState {
827827
if (tailLastNewlineIdx < str.length - 1) {
828828
let numSpaces = str.length - tailLastNewlineIdx - 1;
829829
let trailingSpaces = new StringValue(
830-
str.substring(tailLastNewlineIdx + 1, numSpaces)
830+
str.substring(
831+
tailLastNewlineIdx + 1,
832+
tailLastNewlineIdx + 1 + numSpaces
833+
)
831834
);
832835
listTexts.push(trailingSpaces);
833836
}

0 commit comments

Comments
 (0)