Skip to content

Commit

Permalink
Made use of sizeof to determine buffer size.
Browse files Browse the repository at this point in the history
  • Loading branch information
nschurando committed Feb 17, 2024
1 parent 60d6ecf commit e040787
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tic_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ int tic_reader::read(struct tic_dataset &dataset) {

/* Otherwise, keep appending data to current dataset */
else {
if (m_dataset_buffer_index >= (TIC_PARSER_DATASET_NAME_LENGTH_MAX + 1 + TIC_PARSER_DATASET_TIME_LENGTH_MAX + 1 + TIC_PARSER_DATASET_DATA_LENGTH_MAX + 1 + TIC_PARSER_DATASET_CHECKSUM_LENGTH_MAX)) {
if (m_dataset_buffer_index >= (sizeof(m_dataset_buffer) / sizeof(char))) {
CONFIG_TIC_DEBUG_FUNCTION(" [e] Dataset content too long!");
m_sm = STATE_0;
} else {
Expand Down

0 comments on commit e040787

Please sign in to comment.