Skip to content

Commit

Permalink
Fix buffer size too small
Browse files Browse the repository at this point in the history
  • Loading branch information
nwright-mcc committed Oct 18, 2023
1 parent 07e075a commit d5b2dcb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/c/daqhats_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,10 @@ void convert_tc_type_to_string(uint8_t tc_type,
/* This function converts the mask of channels defined by the channel_mask
parameter and sets the chans_str parameter, which is passed by reference,
to a comma separated string respresentation of the channel numbers. */
void convert_chan_mask_to_string(uint8_t channel_mask, char* chans_str)
void convert_chan_mask_to_string(uint32_t channel_mask, char* chans_str)
{
int i = 0;
char chan_string[8];
char chan_string[16];

if (chans_str == NULL)
return;
Expand All @@ -235,7 +235,7 @@ void convert_chan_mask_to_string(uint8_t channel_mask, char* chans_str)
parameter and sets the chans parameter, which is passed by reference,
to an array of channel numbers.
The return value is an integer representing the number of channels. */
int convert_chan_mask_to_array(uint8_t channel_mask, int chans[])
int convert_chan_mask_to_array(uint32_t channel_mask, int chans[])
{
int i = 0;
int chan_count = 0;
Expand Down

0 comments on commit d5b2dcb

Please sign in to comment.