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
8c1dd139
Commit
8c1dd139
authored
Jul 27, 2014
by
Andrew Zonenberg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed divide-by-zero in D_PAD::ViewGetLOD()
parent
37757b52
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
class_pad.cpp
pcbnew/class_pad.cpp
+5
-0
No files found.
pcbnew/class_pad.cpp
View file @
8c1dd139
...
...
@@ -965,6 +965,11 @@ unsigned int D_PAD::ViewGetLOD( int aLayer ) const
// Netnames will be shown only if zoom is appropriate
if
(
IsNetnameLayer
(
aLayer
)
)
{
// Pad sizes can be zero briefly when someone is typing a number like "0.5" in the pad properties dialog.
// Fail gracefully if this happens.
if
(
(
m_Size
.
x
==
0
)
&&
(
m_Size
.
y
==
0
)
)
return
UINT_MAX
;
return
(
100000000
/
std
::
max
(
m_Size
.
x
,
m_Size
.
y
)
);
}
...
...
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