From e7a9643b379e0d05be8dc56d1630148d0107ec07 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Sat, 22 Sep 2018 08:45:32 -0700 Subject: [PATCH] kicad2step: Provide floats separated Clang++ seems to be in left-field here as it processes a stringstream 1.0X1.0 >> double as a hexadecimal floating point ('X' character) and throws an error rather than converting 1.0 and stopping when it reaches a non-numeric character. This causes errors when exporting step on Mac, which uses clang++ by default. Adding spaces to the string is more explicit and doesn't break gcc. It will be sufficient until we get rid of kicad2step as an external utility. Fixes: lp:1778564 * https://bugs.launchpad.net/kicad/+bug/1778564 --- pcbnew/dialogs/dialog_export_step.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pcbnew/dialogs/dialog_export_step.cpp b/pcbnew/dialogs/dialog_export_step.cpp index f4ae00499d..47c9dd43ba 100644 --- a/pcbnew/dialogs/dialog_export_step.cpp +++ b/pcbnew/dialogs/dialog_export_step.cpp @@ -298,7 +298,7 @@ void DIALOG_EXPORT_STEP::onExportButton( wxCommandEvent& aEvent ) } LOCALE_IO dummy; - cmdK2S.Append( wxString::Format( " --user-origin %.6fx%.6f", xOrg, yOrg ) ); + cmdK2S.Append( wxString::Format( " --user-origin=\"%.6f x %.6f\"", xOrg, yOrg ) ); } break; @@ -308,7 +308,7 @@ void DIALOG_EXPORT_STEP::onExportButton( wxCommandEvent& aEvent ) xOrg = Iu2Millimeter( bbox.GetCenter().x ); yOrg = Iu2Millimeter( bbox.GetCenter().y ); LOCALE_IO dummy; - cmdK2S.Append( wxString::Format( " --user-origin %.6fx%.6f", xOrg, yOrg ) ); + cmdK2S.Append( wxString::Format( " --user-origin=\"%.6f x %.6f\"", xOrg, yOrg ) ); } break; }