7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-21 00:21:25 +00:00

Pcbnew, legacy plugin: fix a minor issue about file version number.

Some .brd files have a version number = 7, very similar to version 2.
So force version = 2 to import these files.
This commit is contained in:
jean-pierre charras 2023-10-23 18:43:14 +02:00
parent 8ec2eb600a
commit dd166ce835

View File

@ -644,6 +644,11 @@ int LEGACY_PLUGIN::getVersion( LINE_READER* aReader )
int ver = 1; // if sccanf fails
sscanf( line, "PCBNEW-BOARD Version %d", &ver );
// Some legacy files have a version number = 7, similar to version 2
// So use in this case ver = 2
if( ver == 7 )
ver = 2;
#if !defined( DEBUG )
if( ver > LEGACY_BOARD_FILE_VERSION )
{