From 429a5067d8dd56a5050fc36080fc1f4fb163def5 Mon Sep 17 00:00:00 2001 From: curt Date: Thu, 31 Jul 2003 01:43:57 +0000 Subject: [PATCH] Make the property tree reading slightly more robust. --- src/Environment/environment_ctrl.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Environment/environment_ctrl.cxx b/src/Environment/environment_ctrl.cxx index 73c9d7b04..1c817277b 100644 --- a/src/Environment/environment_ctrl.cxx +++ b/src/Environment/environment_ctrl.cxx @@ -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);