Eeschema: fix an other erroneous "unit value out of range" test.

This commit is contained in:
Andrey Fedorushkov 2017-05-31 15:43:28 +02:00 committed by jean-pierre charras
parent c0bb8a30c2
commit ddec8036c1
1 changed files with 4 additions and 1 deletions

View File

@ -55,6 +55,8 @@
#include <wx/tokenzr.h>
#include <iostream>
#include <eeschema_id.h> // for MAX_UNIT_COUNT_PER_PACKAGE definition
#define NULL_STRING "_NONAME_"
/**
@ -1457,7 +1459,8 @@ bool SCH_COMPONENT::Load( LINE_READER& aLine, wxString& aErrorMsg )
int multi = atoi( name1 );
if( multi < 0 || multi > 26 )
// Avoid out of range multi id:
if( multi < 0 || multi > MAX_UNIT_COUNT_PER_PACKAGE )
multi = 1;
AddHierarchicalReference( path, ref, multi );