mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-04-07 02:22:58 +00:00
fix out-of-bounds array access (again)
This commit is contained in:
parent
bfd9b6f720
commit
7eaab2691b
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue