Skip to content

Commit

Permalink
funcs: make in_bytes/bits_range more generic
Browse files Browse the repository at this point in the history
  • Loading branch information
wader committed Sep 14, 2021
1 parent 57a1207 commit c770a75
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/interp/funcs.jq
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ def diff($a; $b):
);

def in_bits_range($p):
select(scalars and ._start? and ._start <= $p and $p < ._stop);
select(._start <= $p and $p < ._stop);
def in_bytes_range($p):
select(scalars and ._start? and ._start/8 <= $p and $p < ._stop/8);
select(._start/8 <= $p and $p < ._stop/8);

0 comments on commit c770a75

Please sign in to comment.