From 8003e9ab50f90964085bffa1772eb5adce385153 Mon Sep 17 00:00:00 2001 From: qu1ck Date: Mon, 5 Dec 2022 16:26:23 -0800 Subject: [PATCH] Fix segfault in kicad-cli for int arguments Need to indicate int type to argparse --- kicad/cli/command_export_pcb_gerber.cpp | 1 + kicad/cli/command_export_pcb_svg.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/kicad/cli/command_export_pcb_gerber.cpp b/kicad/cli/command_export_pcb_gerber.cpp index b6405d7355..2d2c19fbda 100644 --- a/kicad/cli/command_export_pcb_gerber.cpp +++ b/kicad/cli/command_export_pcb_gerber.cpp @@ -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 ); } diff --git a/kicad/cli/command_export_pcb_svg.cpp b/kicad/cli/command_export_pcb_svg.cpp index 51382357d7..dd7ae2c5c5 100644 --- a/kicad/cli/command_export_pcb_svg.cpp +++ b/kicad/cli/command_export_pcb_svg.cpp @@ -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 ); }