From 08b840ac3ce9f167045c380e0ebb8266d01fd65d Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sun, 8 Jan 2017 13:59:41 +0200 Subject: [PATCH] Return -1 from Slice::get at eof --- 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 63df62f..9b7ba54 100644 --- a/source/io/slice.cpp +++ b/source/io/slice.cpp @@ -88,7 +88,7 @@ int Slice::get() { Base::Synchronize sync(below); if(!prepare_op(1, M_READ)) - return 0; + return -1; int c = below.get(); if(c==-1 && below.eof()) -- 2.43.0