Description

The call to FMemory::Memset() in UTexture2DFactoryNew::FactoryCreateNew() appears to reverse the expected order of the second and third arguments. Most other calls to FMemory::Memset() appear to send the arguments in the order Pointer, Value, Size (I did not look at every call to this function in the Engine), but in UTexture2DFactoryNew::FactoryCreateNew() the arguments are sent in the order Pointer, Size, Value.

Steps to Reproduce
  1. Locate and open the EditorFactories.cpp file.
  2. Locate the UTexture2DFactoryNew::FactoryCreateNew() function.
    • Line 328 in CL 3944462
  3. Look at the call to FMemory::Memset(DestData, TexturePixels.Num() * sizeof( uint8 ), 255 );
    • Line 347 in CL 3944462

RESULT:
The function call includes the arguments in the following order: Pointer, Size, Value

EXPECTED:
The function call includes the arguments in the following order: Pointer, Value, Size

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-56399 in the post.

0
Login to Vote

Fixed
ComponentTools
Affects Versions4.18.34.194.20
Target Fix4.20
Fix Commit3966719
Main Commit4052378
Release Commit4095966
CreatedMar 22, 2018
ResolvedMar 27, 2018
UpdatedJun 20, 2018
View Jira Issue