summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ucb/source/ucp/webdav/SerfInputStream.cxx8
1 files changed, 2 insertions, 6 deletions
diff --git a/ucb/source/ucp/webdav/SerfInputStream.cxx b/ucb/source/ucp/webdav/SerfInputStream.cxx
index 5aa9f262eed3..f0f954d64855 100644
--- a/ucb/source/ucp/webdav/SerfInputStream.cxx
+++ b/ucb/source/ucp/webdav/SerfInputStream.cxx
@@ -135,13 +135,9 @@ void SAL_CALL SerfInputStream::closeInput()
void SAL_CALL SerfInputStream::seek( sal_Int64 location )
{
- if ( location < 0 )
- throw css::lang::IllegalArgumentException();
-
- if ( location <= mLen )
- mPos = location;
- else
+ if ( location < 0 || location > mLen )
throw css::lang::IllegalArgumentException();
+ mPos = location;
}