From 970a9aee41d1e0b7aecdd972583e7396433a739f Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Mon, 7 Sep 2015 12:25:48 +0300 Subject: [PATCH] Fix end-of-file detection in Slice Prepare_op was incorrectly adding start_offset to the remaining length. --- source/io/slice.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/io/slice.cpp b/source/io/slice.cpp index 59a7cde..63df62f 100644 --- a/source/io/slice.cpp +++ b/source/io/slice.cpp @@ -38,7 +38,7 @@ unsigned Slice::prepare_op(unsigned size, Mode m) sync_position = false; } - SeekOffset remaining = start_offset+length-position; + SeekOffset remaining = length-position; if(size>remaining) size = remaining; if(!size && m==M_READ) -- 2.45.2