Skip to content

Commit

Permalink
Merge pull request bitcraze#749 from bitcraze/bugfix-logGetVarId
Browse files Browse the repository at this point in the history
Fix issue where logGetVarId returns a groupId rather than a varId.
  • Loading branch information
ataffanel authored Mar 30, 2021
2 parents 066697f + 39e296d commit 0864ef9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/modules/src/log.c
Original file line number Diff line number Diff line change
Expand Up @@ -972,9 +972,10 @@ logVarId_t logGetVarId(char* group, char* name)
for(i=0; i<logsLen; i++)
{
if (logs[i].type & LOG_GROUP) {
if (logs[i].type & LOG_START)
if (logs[i].type & LOG_START) {
currgroup = logs[i].name;
} if ((!strcmp(group, currgroup)) && (!strcmp(name, logs[i].name))) {
}
} else if ((!strcmp(group, currgroup)) && (!strcmp(name, logs[i].name))) {
varId = (logVarId_t)i;
return varId;
}
Expand Down

0 comments on commit 0864ef9

Please sign in to comment.