From cc46ee0ec9117cb5669c4f12339f998aed13c4db Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Tue, 26 Mar 2013 19:15:30 +0100 Subject: [PATCH] Pcbnew: Fix Bug #1160396 --- pcbnew/pcb_parser.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pcbnew/pcb_parser.h b/pcbnew/pcb_parser.h index a9659c176c..4b70774565 100644 --- a/pcbnew/pcb_parser.h +++ b/pcbnew/pcb_parser.h @@ -176,9 +176,10 @@ class PCB_PARSER : public PCB_LEXER inline int parseBoardUnits() throw( IO_ERROR ) { - // There should be no rounding issues here, since the values in the file are in mm - // and get converted to nano-meters. This product should be an integer, exactly. - return int( parseDouble() * IU_PER_MM ); + // There should be no major rounding issues here, + // since the values in the file are in mm + // and get converted to nano-meters. + return KiROUND( parseDouble() * IU_PER_MM ); } inline int parseBoardUnits( const char* aExpected ) throw( PARSE_ERROR )