diff options
author | thickbrick | 2011-01-15 01:11:46 +0200 |
---|---|---|
committer | thickbrick | 2011-01-15 01:11:46 +0200 |
commit | fe9a3fe4bfb5589332a21fd07ce4966aaf38117e (patch) | |
tree | 6567c2cc1fb74d6a9a7e520776e46fe35ac1a235 /linden | |
parent | Fix small potential leak of CacheReadResponder objects (diff) | |
download | meta-impy-fe9a3fe4bfb5589332a21fd07ce4966aaf38117e.zip meta-impy-fe9a3fe4bfb5589332a21fd07ce4966aaf38117e.tar.gz meta-impy-fe9a3fe4bfb5589332a21fd07ce4966aaf38117e.tar.bz2 meta-impy-fe9a3fe4bfb5589332a21fd07ce4966aaf38117e.tar.xz |
Fix offset reading from local files
Fix offset reading from local files (non-cached.) This is a bug, so needs
fixing, even though the offset is always 0 here, currently.
Taken from Cool Viewer (patch orginally by Max Fox.)
Diffstat (limited to 'linden')
-rw-r--r-- | linden/indra/newview/lltexturecache.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/linden/indra/newview/lltexturecache.cpp b/linden/indra/newview/lltexturecache.cpp index a1a9a39..4efd10c 100644 --- a/linden/indra/newview/lltexturecache.cpp +++ b/linden/indra/newview/lltexturecache.cpp | |||
@@ -250,9 +250,9 @@ bool LLTextureCacheLocalFileWorker::doRead() | |||
250 | } | 250 | } |
251 | } | 251 | } |
252 | #else | 252 | #else |
253 | if (!mDataSize || mDataSize > local_size) | 253 | if (!mDataSize || mDataSize + mOffset > local_size) |
254 | { | 254 | { |
255 | mDataSize = local_size; | 255 | mDataSize = local_size - mOffset; |
256 | } | 256 | } |
257 | mReadData = new U8[mDataSize]; | 257 | mReadData = new U8[mDataSize]; |
258 | 258 | ||