From e48eda6cc0bdd234f2b385974d1cee66656e070a Mon Sep 17 00:00:00 2001 From: jmoenig Date: Mon, 24 Nov 2014 10:48:49 +0100 Subject: Fixed #644 --- threads.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'threads.js') diff --git a/threads.js b/threads.js index d5040c5..574fd35 100644 --- a/threads.js +++ b/threads.js @@ -1307,7 +1307,7 @@ Process.prototype.doInsertInList = function (element, index, list) { return null; } if (this.inputOption(index) === 'any') { - idx = this.reportRandom(1, list.length()); + idx = this.reportRandom(1, list.length() + 1); } if (this.inputOption(index) === 'last') { idx = list.length() + 1; -- cgit v1.3.1