Commit 3b927035 authored by Lukas Aspöck's avatar Lukas Aspöck

daffv15_write: prevent i2 index from exceeding filter length

parent 4bedcbd8
......@@ -904,7 +904,7 @@ for i=1:props.dataset.numrecords
% Back to Matlab indices (+1)
i1 = recordDesc{i}.effOffset(c) + 1;
i2 = i1 + recordDesc{i}.effLength(c) - 1;
i2 = min(length(data),i1 + recordDesc{i}.effLength(c) - 1);
% Write down the filter coefficients
switch props.quantization
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment