X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=blobdiff_plain;f=dgit;h=d5aa38718c551c7c46b32ecf6c046bb502a50b96;hp=8a54610198e745b3e5f750bf9e787596ee31d5cb;hb=08246013777e261333f6f972554bc02ae17bc60a;hpb=78ec9b7b05edf606cd489b1f091a20446f7a335f;ds=sidebyside diff --git a/dgit b/dgit index 8a546101..d5aa3871 100755 --- a/dgit +++ b/dgit @@ -273,7 +273,7 @@ sub protocol_send_file ($$) { sub protocol_read_bytes ($$) { my ($fh, $nbytes) = @_; - $nbytes =~ m/^[1-9]\d{0,5}$/ or badproto \*RO, "bad byte count"; + $nbytes =~ m/^[1-9]\d{0,5}$|^0$/ or badproto \*RO, "bad byte count"; my $d; my $got = read $fh, $d, $nbytes; $got==$nbytes or badproto_badread $fh, "data block";