diff --git a/pcbnew/gendrill.cpp b/pcbnew/gendrill.cpp index 7ae22b5baa..f431467e57 100644 --- a/pcbnew/gendrill.cpp +++ b/pcbnew/gendrill.cpp @@ -294,8 +294,17 @@ void WinEDA_DrillFrame::SetParams() wxString ps = m_Choice_Precision->GetStringSelection(); wxString l = ps.substr( 0, 1 ); wxString r = ps.substr( 2, 1 ); - l.ToLong( (long*) &s_Precision.m_lhs ); - r.ToLong( (long*) &s_Precision.m_rhs ); + + + // a long is not an int on all machines + long lhs; + long rhs; + + l.ToLong( &lhs ); + r.ToLong( &rhs ); + + s_Precision.m_lhs = lhs; + s_Precision.m_rhs = rhs; }