Skip to content
Snippets Groups Projects
Commit 997d24b8 authored by Bryan O'Sullivan's avatar Bryan O'Sullivan
Browse files

Fix a totally awesometastic piece of code

parent 678d88c6
No related branches found
No related tags found
No related merge requests found
...@@ -57,7 +57,7 @@ class LLColor3 ...@@ -57,7 +57,7 @@ class LLColor3
LLColor3(); // Initializes LLColor3 to (0, 0, 0) LLColor3(); // Initializes LLColor3 to (0, 0, 0)
LLColor3(F32 r, F32 g, F32 b); // Initializes LLColor3 to (r, g, b) LLColor3(F32 r, F32 g, F32 b); // Initializes LLColor3 to (r, g, b)
LLColor3(const F32 *vec); // Initializes LLColor3 to (vec[0]. vec[1], vec[2]) LLColor3(const F32 *vec); // Initializes LLColor3 to (vec[0]. vec[1], vec[2])
LLColor3(char *color_string); // html format color ie "#FFDDEE" LLColor3(const char *color_string); // html format color ie "#FFDDEE"
explicit LLColor3(const LLColor4& color4); // "explicit" to avoid automatic conversion explicit LLColor3(const LLColor4& color4); // "explicit" to avoid automatic conversion
explicit LLColor3(const LLVector4& vector4); // "explicit" to avoid automatic conversion explicit LLColor3(const LLVector4& vector4); // "explicit" to avoid automatic conversion
LLColor3(const LLSD& sd); LLColor3(const LLSD& sd);
...@@ -189,7 +189,7 @@ inline LLColor3::LLColor3(const F32 *vec) ...@@ -189,7 +189,7 @@ inline LLColor3::LLColor3(const F32 *vec)
# pragma warning( disable : 4996 ) // strncpy teh sux0r # pragma warning( disable : 4996 ) // strncpy teh sux0r
#endif #endif
inline LLColor3::LLColor3(char* color_string) // takes a string of format "RRGGBB" where RR is hex 00..FF inline LLColor3::LLColor3(const char* color_string) // takes a string of format "RRGGBB" where RR is hex 00..FF
{ {
if (strlen(color_string) < 6) /* Flawfinder: ignore */ if (strlen(color_string) < 6) /* Flawfinder: ignore */
{ {
...@@ -199,7 +199,7 @@ inline LLColor3::LLColor3(char* color_string) // takes a string of format "RRGGB ...@@ -199,7 +199,7 @@ inline LLColor3::LLColor3(char* color_string) // takes a string of format "RRGGB
return; return;
} }
static char tempstr[7]; /* Flawfinder: ignore */ char tempstr[7];
strncpy(tempstr,color_string,6); /* Flawfinder: ignore */ strncpy(tempstr,color_string,6); /* Flawfinder: ignore */
tempstr[6] = '\0'; tempstr[6] = '\0';
mV[VZ] = (F32)strtol(&tempstr[4],NULL,16)/255.f; mV[VZ] = (F32)strtol(&tempstr[4],NULL,16)/255.f;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment