From 08c53aa99765eee3e97882a96dd3b6e9c244fa32 Mon Sep 17 00:00:00 2001 From: Vreixo Formoso Lopes Date: Mon, 8 Oct 2007 07:57:23 +0000 Subject: [PATCH] Return 0 on EOF in burn_source. --- libisofs/ecma119.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libisofs/ecma119.c b/libisofs/ecma119.c index 1e9c07e..9bcd193 100644 --- a/libisofs/ecma119.c +++ b/libisofs/ecma119.c @@ -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;