Skip to content

Commit

Permalink
Merge pull request #13 from sergot/ugexe-read-buffer
Browse files Browse the repository at this point in the history
Buffer $n bytes before returning
  • Loading branch information
Filip Sergot committed Oct 30, 2015
2 parents 4b8869b + f47608e commit 169c6e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/OpenSSL.pm6
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ method read(Int $n, Bool :$bin) {

my $e = 0;
$e = $.handle-error($read) if $read < 0;
last unless $e > 0;
last if $e <= 0 || $total-read >= $n;
}

return $bin ?? $buf !! $buf.decode('latin-1');
Expand Down

0 comments on commit 169c6e1

Please sign in to comment.