fixing incorrect default upper bound for slice. Fixes #657

This commit is contained in:
gnembon committed 2021-01-07 00:40:39 -04:00
1 parent eac4eb0537
commit f3f8c689a8
6 files changed
+10 -7

No files matched your search

@@ -87,7 +87,7 @@ public class DataStructures {
throw new InternalExpressionException("'slice' takes 2 or 3 arguments");
Value hwat = lv.get(0);
long from = NumericValue.asNumber(lv.get(1)).getLong();
long to = -1;
Long to = null;
if (lv.size()== 3)
to = NumericValue.asNumber(lv.get(2)).getLong();
return hwat.slice(from, to);