Skip to content

Commit

Permalink
main: fix comparison of pointer with character literal
Browse files Browse the repository at this point in the history
The check is to handle --, which has a '\0' character after it.
To do this we need to dereference the pointer. Do so.
  • Loading branch information
a3f committed Jan 19, 2020
1 parent e2f3d0f commit 9d7b47f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ int main(int argc, char *argv[])
char *device = strtok(NULL, ","),
*device2 = strtok(NULL, "");

if (a == '\0')
if (*a == '\0')
{
argc--, argv++;
break;
Expand Down

0 comments on commit 9d7b47f

Please sign in to comment.