Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool VertInfluencedByActiveBone(
- FParticleEmitterInstance* Owner,
- USkeletalMeshComponent* InSkelMeshComponent,
- int32 InVertexIndex,
- int32* OutBoneIndex = NULL);
- void UParticleModuleLocationSkelVertSurface::Spawn(....)
- {
- ....
- int32 BoneIndex1, BoneIndex2, BoneIndex3;
- BoneIndex1 = BoneIndex2 = BoneIndex3 = INDEX_NONE;
- if(!VertInfluencedByActiveBone(
- Owner, SourceComponent, VertIndex[0], &BoneIndex1) &&
- !VertInfluencedByActiveBone(
- Owner, SourceComponent, VertIndex[1], &BoneIndex2) &&
- !VertInfluencedByActiveBone(
- Owner, SourceComponent, VertIndex[2]) &BoneIndex3)
- {
- ....
- }
- Beautiful Bug! This is what should have been written here: !VertInfluencedByActiveBone(Owner, SourceComponent, VertIndex[2], &BoneIndex3))
- This suspicious code was found in UnrealEngine4 project by PVS-Studio static code analyzer.
- Warning message is:
- V564 The '&' operator is applied to bool type value. You've probably forgotten to include parentheses or intended to use the '&&' operator. particlemodules_location.cpp 2120
- PVS-Studio is a static analyzer for detecting bugs in the source code of applications written in C, C++, C++11, C++/CX. Site: http://www.viva64.com/en/pvs-studio/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement