Commit 304c296a authored by CHARRAS's avatar CHARRAS
Browse files

fixed: eeschema crashed when created a B.O.M. (unicode build)

parent f9426909
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -5,6 +5,13 @@ Started 2007-June-11
Please add newer entries at the top, list the date and your name with
Please add newer entries at the top, list the date and your name with
email address.
email address.


2008-Feb-18 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================
+eeschema
	Fixed bug in gen bill of material (dialog_build_BOM.cpp):
	eeschema crashed when created a B.O.M. (i think: unicode version only)


2008-Feb-18 UPDATE Igor Plyatov <plyatov@mail.ru>
2008-Feb-18 UPDATE Igor Plyatov <plyatov@mail.ru>
================================================================================
================================================================================
+eeschema
+eeschema
+8 −7
Original line number Original line Diff line number Diff line
@@ -581,6 +581,7 @@ wxString mask, filename;
		AddDelimiterString(filename);
		AddDelimiterString(filename);
		ExecuteFile(this, editorname, filename);
		ExecuteFile(this, editorname, filename);
	}
	}

}
}




@@ -1042,23 +1043,23 @@ const wxString * Text1, *Text2;
/**************************************************************/
/**************************************************************/
static void DeleteSubCmp( ListComponent * List, int NbItems )
static void DeleteSubCmp( ListComponent * List, int NbItems )
/**************************************************************/
/**************************************************************/
/* Supprime les sous-composants, c'est a dire les descriptions redonnantes des
/* Remove sub components from the list, when multiples parts per package are found in this list
 * boitiers multiples
 * The component list **MUST** be sorted by reference and by unit number
 * La liste des composant doit etre triee par reference et par num d'unite
 */
 */
{
{
int ii;
int ii;
EDA_SchComponentStruct * LibItem;
EDA_SchComponentStruct * LibItem;
wxString OldName;
wxString OldName, CurrName;


	for( ii = 0; ii < NbItems; ii++ )
	for( ii = 0; ii < NbItems; ii++ )
	{
	{
		LibItem = List[ii].m_Comp;
		LibItem = List[ii].m_Comp;
		if( LibItem == NULL )
		if( LibItem == NULL )
			continue;
			continue;
		CurrName = CONV_FROM_UTF8(List[ii].m_Ref);
		if( !OldName.IsEmpty() )
		if( !OldName.IsEmpty() )
		{
		{
			if( strcmp(OldName.mb_str(), List[ii].m_Ref ) == 0 )
			if( OldName == CurrName )	// CurrName is a subpart of OldName: remove it
			{
			{
				List[ii].m_Comp = NULL;
				List[ii].m_Comp = NULL;
				List[ii].m_SheetList.Clear();
				List[ii].m_SheetList.Clear();
@@ -1066,7 +1067,7 @@ wxString OldName;
				
				
			}
			}
		}
		}
		OldName.Printf(_("%s"), List[ii].m_Ref );
		OldName = CurrName;
	}
	}
}
}