Skip to content

Commit

Permalink
Fixed a reference to an undef'd var (thanks, Chunky!)
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Mar 21, 2003
1 parent 142a909 commit 92de4f7
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions IcculusFinger_daemon.pl
Expand Up @@ -53,6 +53,7 @@
# Digests can have a maximum user output now.
# 2.1.5 : Fixes from Gary Briggs: Fixed a regexp, made line before ending
# text format better, fixed centering on Lynx.
# 2.1.6 : Fix from Gary Briggs: undef'd variable reference.
#-----------------------------------------------------------------------------

# !!! TODO: Let [img] tags nest inside [link] tags.
Expand All @@ -65,7 +66,7 @@
use IO::Select; # bleh.

# Version of IcculusFinger. Change this if you are forking the code.
my $version = "v2.1.5";
my $version = "v2.1.6";


#-----------------------------------------------------------------------------#
Expand Down Expand Up @@ -627,6 +628,7 @@ sub output_ending {
__EOF__

} else {
$revision = ((defined $revision) ? "$revision\n" : '');
# Perl has no builtin max
my $maxlength = length($revision);
$maxlength = length($text_credits) if(length($text_credits)>$maxlength);
Expand Down Expand Up @@ -1036,15 +1038,15 @@ sub do_fingering {
if ($do_html_formatting and ($browser =~ /Lynx/)) {
#1 while ($output_text =~ s/^( +)/" " x length($1)/mse);

# The other choice being to split this puppy into two around
# the spaces, and gaffer them back together with
# $output_string = $1.length($2)x" ".$3
# But that's not the perl way.
# The other choice being to split this puppy into two around
# the spaces, and gaffer them back together with
# $output_string = $1.length($2)x" ".$3
# But that's not the perl way.

1 while ($output_text =~ s/^ /\ /ms);
1 while ($output_text =~ s/^(\ )+ /$1\ /ms);
1 while ($output_text =~ s/^ /\ /ms);
1 while ($output_text =~ s/^(\ )+ /$1\ /ms);

# Don't forget some people still use macs.
# Don't forget some people still use macs.
1 while ($output_text =~ s/\r\n/<br>/s);
1 while ($output_text =~ s/\r/<br>/s);
1 while ($output_text =~ s/\n/<br>/s);
Expand Down

0 comments on commit 92de4f7

Please sign in to comment.