Skip to content

Commit

Permalink
chore: use getopt option
Browse files Browse the repository at this point in the history
  • Loading branch information
septs committed May 3, 2024
1 parent 4d81855 commit 7f6b9f2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/applet/profile/download.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,10 @@ static int applet_main(int argc, char **argv)
break;
case 'a':
activation_code = strdup(optarg);
if (strncmp(activation_code, "LPA:", 4) != 0)
if (strncmp(activation_code, "LPA:", 4) == 0)
{
jprint_error("invalid activation code format", NULL);
goto err;
activation_code += 4; // ignore uri scheme
}
activation_code += 4; // skip "LPA:" prefix
break;
case 'h':
case '?':
Expand Down

0 comments on commit 7f6b9f2

Please sign in to comment.