In the following code snippet, 'stringArray' is being incorrectly indexed
with indices 1, 2, and 3. The correct indices are 0, 1, and 2.
else if( stringArray->Length == 3 )
{
int red;
int green;
int blue;
if( int::TryParse( stringArray[0], red ) &&
int::TryParse( stringArray[1], green ) && int::TryParse( stringArray[2],
blue ) )
return gcnew Color4(
Color::FromArgb( red, green, blue ) );
float r = safe_cast<float>( floatConverter-
>ConvertFromString( context, culture, stringArray[1] ) );
float g = safe_cast<float>( floatConverter-
>ConvertFromString( context, culture, stringArray[2] ) );
float b = safe_cast<float>( floatConverter-
>ConvertFromString( context, culture, stringArray[3] ) );
return gcnew Color4( r, g, b );
}
Original issue reported on code.google.com by shawnpre...@gmail.com on 13 Jan 2009 at 6:09
Original issue reported on code.google.com by
shawnpre...@gmail.com
on 13 Jan 2009 at 6:09