diff options
| author | Vadim Savchuk <vsavchuk@productengine.com> | 2010-04-16 15:02:27 +0300 | 
|---|---|---|
| committer | Vadim Savchuk <vsavchuk@productengine.com> | 2010-04-16 15:02:27 +0300 | 
| commit | 8589d8175e71665237384b36d591d7de7e2fa7dd (patch) | |
| tree | 585c9437374da3a48b31501611cf7e3b9189971c /indra/llcommon/llapr.cpp | |
| parent | 5f49061661a401980aa89195995bfb165b33ff12 (diff) | |
| parent | 05116bac35403e6d8f593b7f057602afa057396d (diff) | |
Merge from default branch
--HG--
branch : product-engine
Diffstat (limited to 'indra/llcommon/llapr.cpp')
| -rw-r--r-- | indra/llcommon/llapr.cpp | 11 | 
1 files changed, 5 insertions, 6 deletions
| diff --git a/indra/llcommon/llapr.cpp b/indra/llcommon/llapr.cpp index ed70b1d9f2..7330b00bcf 100644 --- a/indra/llcommon/llapr.cpp +++ b/indra/llcommon/llapr.cpp @@ -543,14 +543,13 @@ S32 LLAPRFile::readEx(const std::string& filename, void *buf, S32 offset, S32 nb  		return 0;  	} -	S32 off; -	if (offset < 0) -		off = LLAPRFile::seek(file_handle, APR_END, 0); -	else -		off = LLAPRFile::seek(file_handle, APR_SET, offset); +	llassert(offset >= 0); + +	if (offset > 0) +		offset = LLAPRFile::seek(file_handle, APR_SET, offset);  	apr_size_t bytes_read; -	if (off < 0) +	if (offset < 0)  	{  		bytes_read = 0;  	} | 
