From 4b52dd754b41948efca0087ccac6d813f1fcce3f Mon Sep 17 00:00:00 2001 From: Ansariel Date: Mon, 10 Jun 2024 18:16:13 +0200 Subject: Fix incorrect use of VX/VY/VZ/VW indices when color components are accessed --- indra/llmath/v3color.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'indra/llmath/v3color.h') diff --git a/indra/llmath/v3color.h b/indra/llmath/v3color.h index ea26e9eb76..7b92f85a0c 100644 --- a/indra/llmath/v3color.h +++ b/indra/llmath/v3color.h @@ -196,17 +196,17 @@ inline LLColor3::LLColor3(void) inline LLColor3::LLColor3(F32 r, F32 g, F32 b) { - mV[VX] = r; - mV[VY] = g; - mV[VZ] = b; + mV[VRED] = r; + mV[VGREEN] = g; + mV[VBLUE] = b; } inline LLColor3::LLColor3(const F32 *vec) { - mV[VX] = vec[VX]; - mV[VY] = vec[VY]; - mV[VZ] = vec[VZ]; + mV[VRED] = vec[VRED]; + mV[VGREEN] = vec[VGREEN]; + mV[VBLUE] = vec[VBLUE]; } #if LL_WINDOWS @@ -226,11 +226,11 @@ inline LLColor3::LLColor3(const char* color_string) // takes a string of format char tempstr[7]; strncpy(tempstr,color_string,6); /* Flawfinder: ignore */ tempstr[6] = '\0'; - mV[VZ] = (F32)strtol(&tempstr[4],NULL,16)/255.f; + mV[VBLUE] = (F32)strtol(&tempstr[4],NULL,16)/255.f; tempstr[4] = '\0'; - mV[VY] = (F32)strtol(&tempstr[2],NULL,16)/255.f; + mV[VGREEN] = (F32)strtol(&tempstr[2],NULL,16)/255.f; tempstr[2] = '\0'; - mV[VX] = (F32)strtol(&tempstr[0],NULL,16)/255.f; + mV[VRED] = (F32)strtol(&tempstr[0],NULL,16)/255.f; } inline const LLColor3& LLColor3::setToBlack(void) -- cgit v1.2.3