Fix unchecked array access (from Coverity scan).

This commit is contained in:
Jeff Young 2020-01-10 17:29:21 +00:00
parent 8abfc13053
commit 8576a4a067
1 changed files with 2 additions and 1 deletions

View File

@ -123,7 +123,8 @@ public:
val = g_shapeNames[ pin->GetShape() ];
break;
case COL_ORIENTATION:
val = g_orientationNames[ LIB_PIN::GetOrientationIndex( pin->GetOrientation() ) ];
if( LIB_PIN::GetOrientationIndex( pin->GetOrientation() ) >= 0 )
val = g_orientationNames[ LIB_PIN::GetOrientationIndex( pin->GetOrientation() ) ];
break;
case COL_NUMBER_SIZE:
val = StringFromValue( aUserUnits, pin->GetNumberTextSize(), true, true );