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