summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/builtin.jq2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/builtin.jq b/src/builtin.jq
index f7c6e9b7..f01280a7 100644
--- a/src/builtin.jq
+++ b/src/builtin.jq
@@ -210,7 +210,7 @@ def ascii_upcase:
# Streaming utilities
def truncate_stream(stream):
- . as $n | null | stream | . as $input | if (.[0]|length) > $n then setpath([0];$input[0][1:]) else empty end;
+ . as $n | null | stream | . as $input | if (.[0]|length) > $n then setpath([0];$input[0][$n:]) else empty end;
def fromstream(i):
foreach i as $item (
[null,false,null,false];