X-Git-Url: https://git.rrq.au/?a=blobdiff_plain;f=fusefile.c;h=8e09b588316719670810ebdc1013c5e1076e60c7;hb=5a6058dfa2458c6b146fdc84934bd2c8d17eb7ea;hp=476ca9d8fb1ffa847e094150b44223a816ed7603;hpb=d7e225ba17002eec13f528e33fe4fc7c54788388;p=rrq%2Ffusefile.git diff --git a/fusefile.c b/fusefile.c index 476ca9d..8e09b58 100644 --- a/fusefile.c +++ b/fusefile.c @@ -269,8 +269,8 @@ static int write_block(off_t off,const char *buf,size_t size) { return -EIO; // past EOF } struct Source *source = &sources.array[ index ]; - off_t from = off - source->start; - off_t max = source->to - source->from - from; + off_t from = off - source->start + source->from; + off_t max = source->to - from; if ( lseek( source->fd, from, SEEK_SET ) < 0 ) { return -EIO; }