Skip to content

Commit

Permalink
Merge pull request i3#237 from cmsxbc/fix_greeter_wrong_args
Browse files Browse the repository at this point in the history
fix(typo): fix wrong greeter_y_expr and  typo error message in arguments parser.
  • Loading branch information
Raymo111 authored Sep 11, 2021
2 parents 305da37 + 73358ff commit d78d220
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions i3lock.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ char verif_y_expr[32] = "iy\0";
char wrong_x_expr[32] = "ix\0";
char wrong_y_expr[32] = "iy\0";
char greeter_x_expr[32] = "ix\0";
char greeter_y_expr[32] = "ix\0";
char greeter_y_expr[32] = "iy\0";

double time_size = 32.0;
double date_size = 14.0;
Expand Down Expand Up @@ -2044,7 +2044,7 @@ int main(int argc, char *argv[]) {
}
arg = optarg;
if (sscanf(arg, "%30[^:]:%30[^:]", wrong_x_expr, wrong_y_expr) != 2) {
errx(1, "verifpos must be of the form x:y\n");
errx(1, "wrongpos must be of the form x:y\n");
}
break;
case 544:
Expand Down Expand Up @@ -2089,11 +2089,11 @@ int main(int argc, char *argv[]) {
case 548:
if (strlen(optarg) > 31) {
// this is overly restrictive since both the x and y string buffers have size 32, but it's easier to check.
errx(1, "indicator position string can be at most 31 characters\n");
errx(1, "greeter position string can be at most 31 characters\n");
}
arg = optarg;
if (sscanf(arg, "%30[^:]:%30[^:]", greeter_x_expr, greeter_y_expr) != 2) {
errx(1, "indpos must be of the form x:y\n");
errx(1, "greeterpos must be of the form x:y\n");
}
break;

Expand Down

0 comments on commit d78d220

Please sign in to comment.