From b9c633721fe1b0a679bd88f175d695a6e54669e4 Mon Sep 17 00:00:00 2001 From: ehofman Date: Mon, 17 Jan 2005 10:39:55 +0000 Subject: [PATCH] Silently ignore platforms that are not specified within the section --- src/Input/input.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Input/input.cxx b/src/Input/input.cxx index 00d8dd375..f0d5a192d 100644 --- a/src/Input/input.cxx +++ b/src/Input/input.cxx @@ -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 + // section + if (n_axis == 0) + continue; } if (n_axis >= (size_t)naxes) {