Skip to content

Commit

Permalink
fix bug in PR GramThanos#8
Browse files Browse the repository at this point in the history
  • Loading branch information
agreppin committed Jul 14, 2024
1 parent 736c736 commit 1b111c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion WakeOnLAN.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ int main(int argc, const char* argv[]){
printf("Failed to bind socket: '%s'.\n", strerror(errno));
exit(EXIT_FAILURE);
}
if(argv[3]) {
if(argc > 2) {
struct ifreq ifr;
memset(&ifr, 0, sizeof(ifr));
snprintf(ifr.ifr_name, sizeof(ifr.ifr_name), "%s", argv[3]);
Expand Down

0 comments on commit 1b111c8

Please sign in to comment.