Skip to content

Commit

Permalink
Prevent uninitialized warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
choroba committed Aug 28, 2024
1 parent 006d442 commit 190f06b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tred_refactored/tredlib/TrEd/Stylesheet.pm
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ sub get_stylesheet_patterns {
$hint = $s->{hint};
$context = $s->{context};
$context = '.*' unless ( wantarray or $context =~ /\S/ );
chomp $context;
chomp $context if length $context;
@$patterns = defined( $s->{patterns} ) ? @{ $s->{patterns} } : ();
}
else {
Expand Down
2 changes: 1 addition & 1 deletion tred_refactored/tredlib/contrib/support/arrows.inc
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ instruction in L<http://ufal.ms.mff.cuni.cz/tred/ar01s10.html>).
$dx ||= 0;
$dy ||= 0;

if ( $node == $target ) {
if ( $node == ($target // -1) ) {

# same node
push @{ $props{-coords} }, <<"COORDS";
Expand Down

0 comments on commit 190f06b

Please sign in to comment.