tools/source/stream/stream.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d5b20f44a9911534dd1796d3bfa8cbca4619e075
Author:     Noel Grandin <noelgran...@gmail.com>
AuthorDate: Wed Dec 16 12:29:17 2020 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Thu Dec 17 14:02:11 2020 +0100

    simplify checkSeek()
    
    Change-Id: Ie6e016aa9fe630691ed71154489c63a182a3f8cc
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107827
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx
index a7021d2b22aa..f807a56cf52f 100644
--- a/tools/source/stream/stream.cxx
+++ b/tools/source/stream/stream.cxx
@@ -1411,7 +1411,7 @@ sal_uInt64 SvStream::Seek(sal_uInt64 const nFilePos)
 
 bool checkSeek(SvStream &rSt, sal_uInt64 nOffset)
 {
-    const sal_uInt64 nMaxSeek(rSt.Tell() + rSt.remainingSize());
+    const sal_uInt64 nMaxSeek = rSt.TellEnd();
     return (nOffset <= nMaxSeek && rSt.Seek(nOffset) == nOffset);
 }
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to