Skip to content

Commit

Permalink
Fix endless loop in Z_Malloc due to imageDeleted always being qtrue, …
Browse files Browse the repository at this point in the history
…even if no images were deleted. (#1209)

Co-authored-by: Tom <[email protected]>
  • Loading branch information
Razish and Tom authored Feb 19, 2024
1 parent 2d618a5 commit 1c3056e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion code/rd-vanilla/tr_image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,7 @@ qboolean RE_RegisterImages_LevelLoadEnd(void)
{
//ri.Printf( PRINT_DEVELOPER, "RE_RegisterImages_LevelLoadEnd():\n");

qboolean imageDeleted = qtrue;
qboolean imageDeleted = qfalse;
for (AllocatedImages_t::iterator itImage = AllocatedImages.begin(); itImage != AllocatedImages.end(); /* blank */)
{
qboolean bEraseOccured = qfalse;
Expand Down
2 changes: 1 addition & 1 deletion codemp/rd-vanilla/tr_image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,7 @@ qboolean RE_RegisterImages_LevelLoadEnd(void)

// int iNumImages = AllocatedImages.size(); // more for curiosity, really.

qboolean imageDeleted = qtrue;
qboolean imageDeleted = qfalse;
for (AllocatedImages_t::iterator itImage = AllocatedImages.begin(); itImage != AllocatedImages.end(); /* blank */)
{
qboolean bEraseOccured = qfalse;
Expand Down

0 comments on commit 1c3056e

Please sign in to comment.