Skip to content

Commit

Permalink
main: fix use of definition after branch
Browse files Browse the repository at this point in the history
The C committee fixed this in C23 because they too thought it was idiotic.
  • Loading branch information
cyanreg committed Jun 5, 2024
1 parent 6f7f238 commit 063d848
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/cyanrip_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1449,6 +1449,7 @@ int main(int argc, char **argv)
int track_metadata_ptr_cnt = 0;
int find_drive_offset_range = 0;
int offset_set = 0;
int img_size = -1;

CRIPArt cover_arts[32] = { 0 };
int nb_cover_arts = 0;
Expand Down Expand Up @@ -1560,8 +1561,8 @@ int main(int argc, char **argv)
settings.disable_coverart_db = 1;
break;
case 'm':
long size = strtol(optarg, NULL, 10);
switch(size) {
img_size = strtol(optarg, NULL, 10);
switch (img_size) {
case -1:
settings.coverart_lookup_size = COVERART_LOOKUP_SIZE_ORIGINAL;
break;
Expand All @@ -1575,7 +1576,7 @@ int main(int argc, char **argv)
settings.coverart_lookup_size = COVERART_LOOKUP_SIZE_1200;
break;
default:
cyanrip_log(ctx, 0, "Invalid max coverart max size %i (must be 250, 500 or 1200)\n", size);
cyanrip_log(ctx, 0, "Invalid max coverart max size %i (must be 250, 500 or 1200)\n", img_size);
return 1;
}
break;
Expand Down

3 comments on commit 063d848

@diizzyy
Copy link
Contributor

@diizzyy diizzyy commented on 063d848 Jun 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cyanreg
Can you generate a static archive too?

Best regards,
Daniel

@cyanreg
Copy link
Owner Author

@cyanreg cyanreg commented on 063d848 Jun 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@diizzyy
Copy link
Contributor

@diizzyy diizzyy commented on 063d848 Jun 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks!

Please sign in to comment.