diff --git a/DirectXTex/DirectXTexDDS.cpp b/DirectXTex/DirectXTexDDS.cpp index 5fc2191..d2dfa94 100644 --- a/DirectXTex/DirectXTexDDS.cpp +++ b/DirectXTex/DirectXTexDDS.cpp @@ -1573,7 +1573,7 @@ HRESULT LoadFromDDSFile( LPCWSTR szFile, DWORD flags, TexMetadata* metadata, Scr } else { - if ( remaining > image.GetPixelsSize() ) + if ( remaining < image.GetPixelsSize() ) { image.Release(); return E_FAIL;