Skip to content
Snippets Groups Projects
Commit 0bd41cbf authored by Tofu Linden's avatar Tofu Linden
Browse files

merge

parents 5dda65c0 799e014f
No related branches found
No related tags found
No related merge requests found
...@@ -535,11 +535,6 @@ S32 LLAPRFile::seek(apr_file_t* file_handle, apr_seek_where_t where, S32 offset) ...@@ -535,11 +535,6 @@ S32 LLAPRFile::seek(apr_file_t* file_handle, apr_seek_where_t where, S32 offset)
//static //static
S32 LLAPRFile::readEx(const std::string& filename, void *buf, S32 offset, S32 nbytes, LLVolatileAPRPool* pool) S32 LLAPRFile::readEx(const std::string& filename, void *buf, S32 offset, S32 nbytes, LLVolatileAPRPool* pool)
{ {
if (offset < 0)
{
return 0; // do nothing, negative offsets don't make sense for reads
}
//***************************************** //*****************************************
apr_file_t* file_handle = open(filename, pool, APR_READ|APR_BINARY); apr_file_t* file_handle = open(filename, pool, APR_READ|APR_BINARY);
//***************************************** //*****************************************
...@@ -548,10 +543,10 @@ S32 LLAPRFile::readEx(const std::string& filename, void *buf, S32 offset, S32 nb ...@@ -548,10 +543,10 @@ S32 LLAPRFile::readEx(const std::string& filename, void *buf, S32 offset, S32 nb
return 0; return 0;
} }
llassert(offset >= 0);
if (offset > 0) if (offset > 0)
{
offset = LLAPRFile::seek(file_handle, APR_SET, offset); offset = LLAPRFile::seek(file_handle, APR_SET, offset);
}
apr_size_t bytes_read; apr_size_t bytes_read;
if (offset < 0) if (offset < 0)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment