fcp: fix wrong write pointer offset when read returns less than DEFB bytes

This commit is contained in:
cinap_lenrek 2015-07-14 20:44:34 +02:00
parent 2aa2f9f359
commit ea7bca1829

View file

@ -204,7 +204,7 @@ worker(int fdf, int fdt, char *from, char *to)
fprint(2, "reading %s at %lld: %r\n", from, o);
_exits("bad");
}
if(pwrite(fdt, buf, n, o) != n){
if(pwrite(fdt, bp, n, o) != n){
fprint(2, "writing %s: %r\n", to);
_exits("bad");
}