mirror of https://github.com/openXC7/prjxray.git
Add frame limit to segmaker to prevent out of bound solutions.
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
This commit is contained in:
parent
76af782e3f
commit
bb1548011a
|
|
@ -225,12 +225,18 @@ class Segmaker:
|
|||
bitname_frame = bit_frame - base_frame
|
||||
bitname_bit = 32 * (
|
||||
bit_wordidx - bitj["offset"]) + bit_bitidx
|
||||
|
||||
# Skip bits above the frame limit.
|
||||
if bitname_frame >= bitj["frames"]:
|
||||
continue
|
||||
|
||||
# some bits are hard to de-correlate
|
||||
# allow force dropping some bits from search space for practicality
|
||||
if bitfilter is None or bitfilter(bitname_frame,
|
||||
bitname_bit):
|
||||
bitname = "%02d_%02d" % (bitname_frame, bitname_bit)
|
||||
segment["bits"].add(bitname)
|
||||
|
||||
return segment
|
||||
|
||||
'''
|
||||
|
|
|
|||
Loading…
Reference in New Issue