Return -1 from Slice::get at eof
authorMikko Rasa <tdb@tdb.fi>
Sun, 8 Jan 2017 11:59:41 +0000 (13:59 +0200)
committerMikko Rasa <tdb@tdb.fi>
Sun, 8 Jan 2017 11:59:41 +0000 (13:59 +0200)
source/io/slice.cpp

index 63df62f29f841d164d5c52e7f80506c16a5a128f..9b7ba5444dbc09451e31b65d3500708820fb4c36 100644 (file)
@@ -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())