Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions Core/Libraries/Source/WWVegas/WW3D2/textureloader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1326,7 +1326,7 @@
//Figure out correct reduction
int reqReduction=WW3D::Get_Texture_Reduction(); //requested reduction

if (reqReduction >= mip_count)

Check warning on line 1329 in Core/Libraries/Source/WWVegas/WW3D2/textureloader.cpp

View workflow job for this annotation

GitHub Actions / Build GeneralsMD / win32-debug+e

'>=': signed/unsigned mismatch

Check warning on line 1329 in Core/Libraries/Source/WWVegas/WW3D2/textureloader.cpp

View workflow job for this annotation

GitHub Actions / Build GeneralsMD / win32-profile+e

'>=': signed/unsigned mismatch

Check warning on line 1329 in Core/Libraries/Source/WWVegas/WW3D2/textureloader.cpp

View workflow job for this annotation

GitHub Actions / Build GeneralsMD / win32+e

'>=': signed/unsigned mismatch
reqReduction=mip_count-1; //leave only the lowest level

//Clamp reduction
Expand Down Expand Up @@ -1363,7 +1363,7 @@
//Figure out correct reduction
int reqReduction=WW3D::Get_Texture_Reduction(); //requested reduction

if (reqReduction >= mip_count)

Check warning on line 1366 in Core/Libraries/Source/WWVegas/WW3D2/textureloader.cpp

View workflow job for this annotation

GitHub Actions / Build GeneralsMD / win32-debug+e

'>=': signed/unsigned mismatch

Check warning on line 1366 in Core/Libraries/Source/WWVegas/WW3D2/textureloader.cpp

View workflow job for this annotation

GitHub Actions / Build GeneralsMD / win32-profile+e

'>=': signed/unsigned mismatch

Check warning on line 1366 in Core/Libraries/Source/WWVegas/WW3D2/textureloader.cpp

View workflow job for this annotation

GitHub Actions / Build GeneralsMD / win32+e

'>=': signed/unsigned mismatch
reqReduction=mip_count-1; //leave only the lowest level

//Clamp reduction
Expand Down Expand Up @@ -1775,6 +1775,11 @@

void TextureLoadTaskClass::Lock_Surfaces(void)
{
// Guard against NULL pointer dereference
if (!D3DTexture) {
return;
}

MipLevelCount = D3DTexture->GetLevelCount();

for (unsigned int i = 0; i < MipLevelCount; ++i)
Expand Down Expand Up @@ -2154,6 +2159,11 @@

void CubeTextureLoadTaskClass::Lock_Surfaces(void)
{
// Guard against NULL pointer dereference
if (!D3DTexture) {
return;
}

for (unsigned int f=0; f<6; f++)
{
for (unsigned int i=0; i<MipLevelCount; i++)
Expand Down Expand Up @@ -2526,6 +2536,11 @@

void VolumeTextureLoadTaskClass::Lock_Surfaces()
{
// Guard against NULL pointer dereference
if (!D3DTexture) {
return;
}

for (unsigned int i=0; i<MipLevelCount; i++)
{
D3DLOCKED_BOX locked_box;
Expand Down
Loading