Description

A user pointed out a potential to have an index out of range error in the source code.

There are also a few magic numbers scattered around in this function.

Steps to Reproduce
  1. Open the file LightMap.cpp
  2. Find the function FLightMap2D::Serialize().

RESULT:
The if statement if( Ar.IsLoading() && Ar.UE4Ver() < VER_UE4_LOW_QUALITY_DIRECTIONAL_LIGHTMAPS ) contains a for loop that loops three times, but the Texture array contained in the loop only has two elements. On the third loop, the texture array may try to reference a non-existing element.

EXPECTED:
No out of range condition exists.

Have Comments or More Details?

Head over to the existing Questions & Answers thread and let us know what's up.

0
Login to Vote

Fixed
ComponentUE - Graphics Features
Affects Versions4.6.14.8
Target Fix4.7
Fix Commit2399421
Release Commit2399818
CreatedDec 30, 2014
ResolvedJan 7, 2015
UpdatedApr 27, 2018
View Jira Issue