From 38b37a068d4d74b5228aaa7a499fe3fad2358172 Mon Sep 17 00:00:00 2001 From: mfranz Date: Sat, 9 Jun 2007 18:36:56 +0000 Subject: [PATCH] - allow for (rather unusual) ////// cloud groups - fix potential use of uninitialized memory: dew --- simgear/environment/metar.cxx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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') -- 2.39.5