Skip to content

Commit

Permalink
fix out-of-bounds array access (again)
Browse files Browse the repository at this point in the history
  • Loading branch information
RicardoLuis0 committed Feb 8, 2025
1 parent bfd9b6f commit 7eaab26
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/r_data/models.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ void RenderModel(FModelRenderer *renderer, float x, float y, float z, FSpriteMod

// [MK] distortions might happen depending on when the pixel stretch is compensated for
// so we make the "undistorted" behavior opt-in
if (smf_flags & MDL_CORRECTPIXELSTRETCH)
if ((smf_flags & MDL_CORRECTPIXELSTRETCH) && smf->modelIDs.Size() > 0)
{
stretch = (smf->modelIDs[0] >= 0 ? Models[smf->modelIDs[0]]->getAspectFactor(actor->Level->info->pixelstretch) : 1.f) / actor->Level->info->pixelstretch;
objectToWorldMatrix.scale(1, stretch, 1);
Expand Down

0 comments on commit 7eaab26

Please sign in to comment.