Fix segfault in kicad-cli for int arguments

Need to indicate int type to argparse
This commit is contained in:
qu1ck 2022-12-05 16:26:23 -08:00 committed by Mark Roszko
parent 008704fc6f
commit 8003e9ab50
2 changed files with 2 additions and 0 deletions

View File

@ -78,6 +78,7 @@ CLI::EXPORT_PCB_GERBER_COMMAND::EXPORT_PCB_GERBER_COMMAND() : EXPORT_PCB_BASE_CO
m_argParser.add_argument( ARG_PRECISION )
.help( UTF8STDSTR(
_( "Precision of gerber coordinates, valid options: 5 or 6" ) ) )
.scan<'i', int>()
.default_value( 6 );
}

View File

@ -55,6 +55,7 @@ CLI::EXPORT_PCB_SVG_COMMAND::EXPORT_PCB_SVG_COMMAND() : EXPORT_PCB_BASE_COMMAND(
m_argParser.add_argument( ARG_PAGE_SIZE )
.help( UTF8STDSTR( _( "Set page sizing mode (0 = page with frame and title block, 1 = "
"current page size, 2 = board area only)" ) ) )
.scan<'i', int>()
.default_value( 0 );
}