Skip to content

Commit 7d2e41b

Browse files
committed
fix overflow in AutoInterpretation for certain signals
1 parent 6f50d09 commit 7d2e41b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/urh/cythonext/auto_interpretation.pyx

+1-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ cpdef np.ndarray[np.uint64_t, ndim=1] merge_plateaus(np.ndarray[np.uint64_t, ndi
163163
n += 2
164164

165165
tmp_sum = 0
166-
for j in range(i - 1, i + n):
166+
for j in range(i - 1, min(L, i + n)):
167167
tmp_sum += plateaus[j]
168168

169169
result[current] = tmp_sum

0 commit comments

Comments
 (0)