Commit 373b7d73 authored by Leo Gordon's avatar Leo Gordon
Browse files

bugfix - branch_name_2_code should return 1 on undef

parent b0c31a30
......@@ -56,7 +56,7 @@ Description: encodes a branch mnemonic name into numeric code
sub branch_name_2_code {
my $branch_name_or_code = pop @_; # NB: we take the *last* arg, so it works both as a method and a subroutine
return unless(defined($branch_name_or_code));
return 1 unless(defined($branch_name_or_code));
my $branch_code = ($branch_name_or_code=~/^\-?\d+$/)
? $branch_name_or_code
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment