smell: potential div-by-0

This commit is contained in:
Scott Giese 2020-11-23 16:14:37 -06:00
parent 59e62b1414
commit 112c9a110b

View File

@ -777,6 +777,7 @@ bool SGMetar::scanVisibility()
return false;
if (!scanNumber(&m, &denom, 1, 2))
return false;
if (denom != 0)
distance += (double)i / denom;
}