From: mfranz Date: Sat, 9 Jun 2007 18:36:56 +0000 (+0000) Subject: - allow for (rather unusual) ////// cloud groups X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=38b37a068d4d74b5228aaa7a499fe3fad2358172;p=simgear.git - allow for (rather unusual) ////// cloud groups - fix potential use of uninitialized memory: dew --- diff --git a/simgear/environment/metar.cxx b/simgear/environment/metar.cxx index c02c6934..9342c548 100644 --- a/simgear/environment/metar.cxx +++ b/simgear/environment/metar.cxx @@ -747,6 +747,14 @@ bool SGMetar::scanSkyCondition() int i; SGMetarCloud cl; + if (!strncmp(m, "//////", 6)) { + m += 6; + if (!scanBoundary(&m)) + return false; + _m = m; + return true; + } + if (!strncmp(m, "CLR", i = 3) // clear || !strncmp(m, "SKC", i = 3) // sky clear || !strncmp(m, "NSC", i = 3) // no significant clouds @@ -836,7 +844,7 @@ bool SGMetar::scanTemperature() return false; if (!scanBoundary(&m)) { if (!strncmp(m, "XX", 2)) // not spec compliant! - m += 2, sign = 0; + m += 2, sign = 0, dew = temp; else { sign = 1; if (*m == 'M')