mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-11 00:30:01 +00:00
Avoid divide-by-zero.
This commit is contained in:
parent
dcfb7cadce
commit
e42788a3eb
5
thirdparty/tinyspline_lib/tinyspline.c
vendored
5
thirdparty/tinyspline_lib/tinyspline.c
vendored
@ -1307,6 +1307,11 @@ int ts_fequals( tsReal x, tsReal y )
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
// KIDAD FIX for divide-by-zero
|
||||
else if( y == 0.0 )
|
||||
{
|
||||
return x == 0.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
const tsReal r = (tsReal) fabs( x ) > (tsReal) fabs( y ) ?
|
||||
|
Loading…
Reference in New Issue
Block a user