Permalink
Browse files

Off by one.

  • Loading branch information...
1 parent cee33d9 commit 9862b489c7b627ee502105ed5460d2769a872b56 @gisle committed Jan 2, 2003
Showing with 1 addition and 1 deletion.
  1. +1 −1 encode-base64
View
@@ -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, ""));
}
}

0 comments on commit 9862b48

Please sign in to comment.