Skip to content

Commit

Permalink
Restrict to decimal digits
Browse files Browse the repository at this point in the history
\d is locale-dependent and matches much more than we want.
  • Loading branch information
briandfoy authored Nov 3, 2023
1 parent 88b26fa commit c42f5c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/cmp
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ exit $saw_difference;
sub skipnum {
my $n = shift;
return hex($n) if ($n =~ m/\A0x/);
return int($n) if ($n =~ m/\A\d+\Z/);
return int($n) if ($n =~ m/\A[0-9]+\z/);
warn "$Program: invalid offset number '$n'\n";
usage();
}
Expand Down

0 comments on commit c42f5c8

Please sign in to comment.