fix: prevent out-of-bounds trace datatype index
This commit is contained in:
parent
9b8beed836
commit
191b6eb7f8
1 changed files with 1 additions and 1 deletions
|
|
@ -147,7 +147,7 @@ static void findVariable(CO_trace_t *trace) {
|
|||
/* third sequence: Output type */
|
||||
dtIndex += ((*trace->format) >> 1) * 6;
|
||||
|
||||
if(dtIndex > (sizeof(dataTypes) / sizeof(CO_trace_dataType_t))) {
|
||||
if(dtIndex >= (sizeof(dataTypes) / sizeof(CO_trace_dataType_t))) {
|
||||
err = true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue