Commit d0173b4
Benjamin Moody
calc_checksum: handle non-smooth partial records.
calc_checksum is called in order to calculate checksums of the signal
data (d_signal or e_d_signal) in a record. In particular, if rdrecord
is used to read only part of a record, it will call calc_checksum to
determine the checksums of that part of the record. However, at that
time, self.n_sig is still equal to the total number of signals in the
input record (not the number of signals stored in d_signal or
e_d_signal, which might be different if a subset of channels are
selected). Thus, if expanded is true and self.n_sig >
len(self.e_d_signal), this would crash.
For simplicity, and consistency with the expanded=False case, ignore
n_sig and simply calculate the checksums of e_d_signal.1 parent 1b9c90c commit d0173b4
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
750 | 750 | | |
751 | 751 | | |
752 | 752 | | |
753 | | - | |
| 753 | + | |
754 | 754 | | |
755 | 755 | | |
756 | 756 | | |
| |||
0 commit comments