From 6ed91582efea3540af485b56be5d04a446afe2b1 Mon Sep 17 00:00:00 2001 From: castano Date: Thu, 21 Oct 2010 18:47:27 +0000 Subject: [PATCH] Fix seek bug. Fixes issue 144. --- branches/2.0/ChangeLog | 1 + branches/2.0/src/nvcore/StdStream.h | 2 +- trunk/src/nvcore/StdStream.h | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/branches/2.0/ChangeLog b/branches/2.0/ChangeLog index fca2564..637e2e3 100644 --- a/branches/2.0/ChangeLog +++ b/branches/2.0/ChangeLog @@ -6,6 +6,7 @@ NVIDIA Texture Tools version 2.0.9 * Add an XNA Game Studio 3.1 Content Processor to make it easy to utilize NVIDIA Texture Tools in XNA applications. * Fix single color DXT1a compressor. Fixes issue 134. * Fix mirror sampling. Fixes issue 135. + * Fix seek bug. Fixes issue 144. NVIDIA Texture Tools version 2.0.8 * Fix float to fixed image conversion. Patch provided by Alex Pfaffe. Fixes issue 121. diff --git a/branches/2.0/src/nvcore/StdStream.h b/branches/2.0/src/nvcore/StdStream.h index 4304612..aefb281 100644 --- a/branches/2.0/src/nvcore/StdStream.h +++ b/branches/2.0/src/nvcore/StdStream.h @@ -50,7 +50,7 @@ public: virtual void seek( uint pos ) { nvDebugCheck(m_fp != NULL); - nvDebugCheck(pos < size()); + nvDebugCheck(pos <= size()); fseek(m_fp, pos, SEEK_SET); } diff --git a/trunk/src/nvcore/StdStream.h b/trunk/src/nvcore/StdStream.h index b958cc8..bdbe6ad 100644 --- a/trunk/src/nvcore/StdStream.h +++ b/trunk/src/nvcore/StdStream.h @@ -59,7 +59,7 @@ namespace nv virtual void seek( uint pos ) { nvDebugCheck(m_fp != NULL); - nvDebugCheck(pos < size()); + nvDebugCheck(pos <= size()); #if NV_OS_WIN32 _fseek_nolock(m_fp, pos, SEEK_SET); #elif NV_OS_LINUX