smell: potential div-by-0
This commit is contained in:
parent
59e62b1414
commit
112c9a110b
@ -777,6 +777,7 @@ bool SGMetar::scanVisibility()
|
||||
return false;
|
||||
if (!scanNumber(&m, &denom, 1, 2))
|
||||
return false;
|
||||
if (denom != 0)
|
||||
distance += (double)i / denom;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user