mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-04-07 02:22:58 +00:00
fix out-of-bounds array access
This commit is contained in:
parent
eb7c99b34a
commit
a872097da1
1 changed files with 1 additions and 1 deletions
|
@ -186,7 +186,7 @@ void RenderModel(FModelRenderer *renderer, float x, float y, float z, FSpriteMod
|
|||
objectToWorldMatrix.rotate(smf->pitchoffset, 0, 0, 1);
|
||||
objectToWorldMatrix.rotate(-smf->rolloffset, 1, 0, 0);
|
||||
|
||||
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