Skip to content

Commit

Permalink
Off by one.
Browse files Browse the repository at this point in the history
  • Loading branch information
gisle committed Jan 2, 2003
1 parent cee33d9 commit 9862b48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion encode-base64
Expand Up @@ -5,7 +5,7 @@ use MIME::Base64 qw(encode_base64);
my $buf = "";
while (<>) {
$buf .= $_;
if (length($buf) > 57) {
if (length($buf) >= 57) {
print encode_base64(substr($buf, 0, int(length($buf) / 57) * 57, ""));
}
}
Expand Down

0 comments on commit 9862b48

Please sign in to comment.