diff --git a/eeschema/connection_graph.cpp b/eeschema/connection_graph.cpp index 482c333b72..59228d7d52 100644 --- a/eeschema/connection_graph.cpp +++ b/eeschema/connection_graph.cpp @@ -2770,9 +2770,9 @@ bool CONNECTION_GRAPH::ercCheckLabels( const CONNECTION_SUBGRAPH* aSubgraph ) int pinCount = 0; auto hasPins = - []( const CONNECTION_SUBGRAPH* aSubgraph ) + []( const CONNECTION_SUBGRAPH* aLocSubgraph ) { - for( const SCH_ITEM* item : aSubgraph->m_items ) + for( const SCH_ITEM* item : aLocSubgraph->m_items ) { switch( item->Type() ) { diff --git a/eeschema/sch_plugins/legacy/sch_legacy_plugin.cpp b/eeschema/sch_plugins/legacy/sch_legacy_plugin.cpp index 6d47801d3b..a7f72b6513 100644 --- a/eeschema/sch_plugins/legacy/sch_legacy_plugin.cpp +++ b/eeschema/sch_plugins/legacy/sch_legacy_plugin.cpp @@ -1186,6 +1186,10 @@ SCH_BITMAP* SCH_LEGACY_PLUGIN::loadBitmap( LINE_READER& aReader ) // Read PNG data, stored in hexadecimal, // each byte = 2 hexadecimal digits and a space between 2 bytes // and put it in memory stream buffer + // Note: + // Some old files created bu the V4 schematic versions have a extra + // "$EndBitmap" at the end of the hexadecimal data. (Probably due to + // a bug). So discard it int len = strlen( line ); for( ; len > 0 && !isspace( *line ) && '$' != *line; len -= 3, line += 3 )