Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
13b0784c
Commit
13b0784c
authored
Jul 24, 2014
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix overflow in track len calculations and display (Bug #1347878).
parent
c1f11a1b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
class_board.cpp
pcbnew/class_board.cpp
+2
-2
class_track.cpp
pcbnew/class_track.cpp
+1
-1
No files found.
pcbnew/class_board.cpp
View file @
13b0784c
...
@@ -1878,10 +1878,10 @@ TRACK* BOARD::MarkTrace( TRACK* aTrace, int* aCount,
...
@@ -1878,10 +1878,10 @@ TRACK* BOARD::MarkTrace( TRACK* aTrace, int* aCount,
}
}
if
(
aTraceLength
)
if
(
aTraceLength
)
*
aTraceLength
=
KiROUND
(
full_len
)
;
*
aTraceLength
=
full_len
;
if
(
aPadToDieLength
)
if
(
aPadToDieLength
)
*
aPadToDieLength
=
KiROUND
(
lenPadToDie
)
;
*
aPadToDieLength
=
lenPadToDie
;
if
(
aCount
)
if
(
aCount
)
*
aCount
=
NbSegmBusy
;
*
aCount
=
NbSegmBusy
;
...
...
pcbnew/class_track.cpp
View file @
13b0784c
...
@@ -1002,7 +1002,7 @@ void TRACK::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList )
...
@@ -1002,7 +1002,7 @@ void TRACK::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList )
double
trackLen
=
0
;
double
trackLen
=
0
;
double
lenPadToDie
=
0
;
double
lenPadToDie
=
0
;
board
->
MarkTrace
(
this
,
NULL
,
&
trackLen
,
&
lenPadToDie
,
false
);
board
->
MarkTrace
(
this
,
NULL
,
&
trackLen
,
&
lenPadToDie
,
false
);
msg
=
::
Coordinat
eToString
(
trackLen
);
msg
=
::
LengthDoubl
eToString
(
trackLen
);
aList
.
push_back
(
MSG_PANEL_ITEM
(
_
(
"Track Len"
),
msg
,
DARKCYAN
)
);
aList
.
push_back
(
MSG_PANEL_ITEM
(
_
(
"Track Len"
),
msg
,
DARKCYAN
)
);
if
(
lenPadToDie
!=
0
)
if
(
lenPadToDie
!=
0
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment