diff --git a/eeschema/sim/sim_value.cpp b/eeschema/sim/sim_value.cpp index 118f40ec7b..7dc2350360 100644 --- a/eeschema/sim/sim_value.cpp +++ b/eeschema/sim/sim_value.cpp @@ -164,10 +164,17 @@ static inline void handleNodeForParse( tao::pegtl::parse_tree::node& aNode, for( const auto& subnode : aNode.children ) { - if( subnode->is_type() ) - aParseResult.intPart = std::stol( subnode->string() ); - else if( subnode->is_type() ) - aParseResult.fracPart = std::stol( subnode->string() ); + try + { + if( subnode->is_type() ) + aParseResult.intPart = std::stoll( subnode->string() ); + else if( subnode->is_type() ) + aParseResult.fracPart = std::stoll( subnode->string() ); + } + catch( const std::exception& ) + { + aParseResult.isOk = false; + } } } else if( aNode.is_type() )