diff --git a/eeschema/class_netlist_object.cpp b/eeschema/class_netlist_object.cpp index 0b62b47dab..34c7333a47 100644 --- a/eeschema/class_netlist_object.cpp +++ b/eeschema/class_netlist_object.cpp @@ -259,7 +259,7 @@ void NETLIST_OBJECT::ConvertBusToNetListItems( NETLIST_OBJECT_LIST& aNetListItem i = busNumber.Find( '[' ); i++; - while( busNumber[i] != '.' && i < busNumber.Len() ) + while( i < busNumber.Len() && busNumber[i] != '.' ) { tmp.Append( busNumber[i] ); i++; @@ -267,12 +267,12 @@ void NETLIST_OBJECT::ConvertBusToNetListItems( NETLIST_OBJECT_LIST& aNetListItem tmp.ToLong( &begin ); - while( busNumber[i] == '.' && i < busNumber.Len() ) + while( i < busNumber.Len() && busNumber[i] == '.' ) i++; tmp.Empty(); - while( busNumber[i] != ']' && i < busNumber.Len() ) + while( i < busNumber.Len() && busNumber[i] != ']' ) { tmp.Append( busNumber[i] ); i++; diff --git a/pcbnew/dialogs/dialog_freeroute_exchange.cpp b/pcbnew/dialogs/dialog_freeroute_exchange.cpp index e3835adfcf..43755778d3 100644 --- a/pcbnew/dialogs/dialog_freeroute_exchange.cpp +++ b/pcbnew/dialogs/dialog_freeroute_exchange.cpp @@ -203,10 +203,14 @@ void DIALOG_FREEROUTE::OnLaunchButtonClick( wxCommandEvent& event ) #else #warning Kicad needs wxWidgets >= 2.9.4. version 2.8 is only supported for testing purposes #endif // wxCHECK_VERSION( 2, 9, 0 ) -#endif // __WINDOWS__ if( m_freeRouterIsLocal ) command << wxT("bin\\") << javaCommand; +#else // __WINDOWS__ + + if( m_freeRouterIsLocal ) + command << javaCommand; +#endif else // Wrap FullFileName in double quotes in case it has C:\Program Files in it. // The space is interpreted as an argument separator. @@ -254,7 +258,11 @@ wxString DIALOG_FREEROUTE::CmdRunFreeRouterLocal() wxFileName jarfileName( FindKicadFile( wxT( "freeroute.jar" ) ), wxPATH_UNIX ); wxString command = wxT("java -jar "); - command << wxChar( '"' ) << jarfileName.GetFullPath() << wxT( "\" -de " ); + // add "freeroute.jar" to command line: + command << wxChar( '"' ) << jarfileName.GetFullPath() << wxChar( '"' ); + // add option to load the .dsn file + command << wxT( " -de " ); + // add *.dsn full filename (quoted): command << wxChar( '"' ) << fullFileName << wxChar( '"' ); return command;