]> git.mxchange.org Git - flightgear.git/commitdiff
Silently ignore platforms that are not specified within the <number></number> section
authorehofman <ehofman>
Mon, 17 Jan 2005 10:39:55 +0000 (10:39 +0000)
committerehofman <ehofman>
Mon, 17 Jan 2005 10:39:55 +0000 (10:39 +0000)
src/Input/input.cxx

index 00d8dd375056360e04bd6dc20debbb354515148d..f0d5a192d0484b0c1accaff82432a3d1b1cf615d 100644 (file)
@@ -476,7 +476,12 @@ FGInput::_init_joystick ()
       const SGPropertyNode * num_node = axis_node->getChild("number");
       size_t n_axis = axis_node->getIndex();
       if (num_node != 0) {
-          n_axis = num_node->getIntValue(TGT_PLATFORM,n_axis);
+          n_axis = num_node->getIntValue(TGT_PLATFORM, 0);
+
+          // Silently ignore platforms that are not specified within the
+          // <number></number> section
+          if (n_axis == 0)
+             continue;
       }
 
       if (n_axis >= (size_t)naxes) {