]> git.mxchange.org Git - flightgear.git/commitdiff
Make the property tree reading slightly more robust.
authorcurt <curt>
Thu, 31 Jul 2003 01:43:57 +0000 (01:43 +0000)
committercurt <curt>
Thu, 31 Jul 2003 01:43:57 +0000 (01:43 +0000)
src/Environment/environment_ctrl.cxx

index 73c9d7b0407038a8a582772e0041a9a6f748155e..1c817277b8d86e15d754dca8a9ca14018bffde38 100644 (file)
@@ -209,8 +209,10 @@ FGInterpolateEnvironmentCtrl::read_table (const SGPropertyNode * node,
 {
     for (int i = 0; i < node->nChildren(); i++) {
         const SGPropertyNode * child = node->getChild(i);
-        if (!strcmp(child->getName(), "entry") &&
-            child->getStringValue("elevation-ft", "")[0] != '\0') {
+        if ( strcmp(child->getName(), "entry") == 0
+            && child->getStringValue("elevation-ft", "")[0] != '\0'
+            && ( child->getDoubleValue("elevation-ft") > 0.1 || i == 0 ) )
+       {
             bucket * b = new bucket;
             if (i > 0)
                 b->environment.copy(table[i-1]->environment);