From 0167db5efedd2948d12e6daa48bd9907e072cb97 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Tue, 24 Dec 2013 17:49:41 +0000 Subject: [PATCH] flac afh: Fix off-by-one bug in meta_eof_cb(). After the full file has been read, the file position equals the number of available bytes. The eof callback did not report EOF in this case. --- flac_afh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flac_afh.c b/flac_afh.c index 21f86f46..eeb0e86c 100644 --- a/flac_afh.c +++ b/flac_afh.c @@ -80,7 +80,7 @@ static FLAC__int64 meta_tell_cb(FLAC__IOHandle handle) static int meta_eof_cb(FLAC__IOHandle handle) { struct private_flac_afh_data *pfad = handle; - return pfad->fpos == pfad->map_bytes - 1; + return pfad->fpos == pfad->map_bytes; } static int meta_close_cb(FLAC__IOHandle __a_unused handle) -- 2.39.2