Page MenuHomeFeedback Tracker

Reading of colors from ctx is broken
Assigned, UrgentPublic

Description

in ItemBase.c in the function: bool ReadVarsFromCTX(ParamsReadContext ctx, int version = -1)
the following code is there:

			if( mask & VARIABLE_COLOR )
			{
				if ( !ctx.Read(intValue) )
					return false;
				
				m_ColorComponentR = intValue;
				if ( !ctx.Read(value) )
					return false;
				
				m_ColorComponentG = intValue;
				if ( !ctx.Read(value) )
					return false;
				
				m_ColorComponentB = intValue;
				if ( !ctx.Read(value) )
					return false;
	
				m_ColorComponentA = intValue;
			}

That should read:

			if( mask & VARIABLE_COLOR )
			{
				if ( !ctx.Read(intValue) )
					return false;
				
				m_ColorComponentR = intValue;
				if ( !ctx.Read(intValue) )
					return false;
				
				m_ColorComponentG = intValue;
				if ( !ctx.Read(intValue) )
					return false;
				
				m_ColorComponentB = intValue;
				if ( !ctx.Read(intValue) )
					return false;
	
				m_ColorComponentA = intValue;
			}

key difference being intValue actually being set instead of value for G B and A.

Details

Severity
None
Resolution
Open
Reproducibility
N/A
Operating System
Windows 10 x64
Category
General
Additional Information

<3 from DUG

Event Timeline

Geez changed the task status from New to Assigned.Apr 12 2021, 10:52 AM