Return 0 on EOF in burn_source.
This commit is contained in:
parent
cb023891e5
commit
240377b3d0
@ -876,7 +876,7 @@ bs_read_block(struct burn_source *bs)
|
||||
t->curblock++;
|
||||
return t->block_size;
|
||||
}
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
if (t->state_data_valid)
|
||||
write_data_chunk(t, t->buffer);
|
||||
@ -898,8 +898,8 @@ bs_read(struct burn_source *bs, unsigned char *buf, int size)
|
||||
/* we need to read next block */
|
||||
t->bytes_read = 0;
|
||||
ret = bs_read_block(bs);
|
||||
if (ret < 0)
|
||||
return -1;
|
||||
if (ret <= 0)
|
||||
return ret;
|
||||
}
|
||||
|
||||
int bytes_to_read = 2048 - t->bytes_read;
|
||||
|
Loading…
Reference in New Issue
Block a user