]> git.mxchange.org Git - simgear.git/commitdiff
- allow for (rather unusual) ////// cloud groups
authormfranz <mfranz>
Sat, 9 Jun 2007 18:36:56 +0000 (18:36 +0000)
committermfranz <mfranz>
Sat, 9 Jun 2007 18:36:56 +0000 (18:36 +0000)
- fix potential use of uninitialized memory: dew

simgear/environment/metar.cxx

index c02c6934476ef07779e141a3244445d6342eaf3a..9342c5482cd57be5a88186365bba48b515ccba7f 100644 (file)
@@ -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')