ols: Properly initialize entire single-sample buffer before start

The single sample buffer, up to 4 bytes long, was not getting initialized
on (every) acquisition start, only after the first full sample was in.
This caused the first sample to potentially hold garbage.
This commit is contained in:
Bert Vermeulen 2013-08-26 23:42:09 +02:00
parent eb1b610b12
commit abb39e6b8c
1 changed files with 1 additions and 0 deletions

View File

@ -503,6 +503,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi,
/* Reset all operational states. */
devc->num_transfers = devc->num_samples = devc->num_bytes = 0;
memset(devc->sample, 0, 4);
/* Send header packet to the session bus. */
std_session_send_df_header(cb_data, LOG_PREFIX);