Skip to content

Commit

Permalink
Fix for ListFromInt
Browse files Browse the repository at this point in the history
The intVal parameter was already casted to a normal int, but then trying to use ".value" to read its value.
  • Loading branch information
joningold authored and y-lohse committed May 28, 2018
1 parent 9828d96 commit b000e11
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions engine/Story.js
Expand Up @@ -864,9 +864,9 @@ export class Story extends InkObject{

var foundListDef;
if (foundListDef = this.listDefinitions.TryListGetDefinition(listNameVal, foundListDef)) {
var foundItem = foundListDef.TryGetItemWithValue(intVal.value);
var foundItem = foundListDef.TryGetItemWithValue(intVal);
if (foundItem.exists) {
generatedListValue = new ListValue(foundItem.item, intVal.value);
generatedListValue = new ListValue(foundItem.item, intVal);
}
} else {
throw new StoryException("Failed to find LIST called " + listNameVal.value);
Expand Down

0 comments on commit b000e11

Please sign in to comment.