From 01af31d4dab33b3f22ca930944b285eedefb50cb Mon Sep 17 00:00:00 2001 From: Mathew Sutcliffe Date: Tue, 24 Sep 2013 01:04:22 +0100 Subject: [PATCH] fixed bug which was discovered due to a GCC warning --- src/blackcore/network_vatlib.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/blackcore/network_vatlib.cpp b/src/blackcore/network_vatlib.cpp index f2830564b..985bdc0db 100644 --- a/src/blackcore/network_vatlib.cpp +++ b/src/blackcore/network_vatlib.cpp @@ -486,9 +486,12 @@ namespace BlackCore { const char* key = keysValues[0]; const char* value = keysValues[1]; - if (key == net->capability_AtcInfo) { flags |= AcceptsAtisResponses; } - else if (key == net->capability_InterimPos) { flags |= SupportsInterimPosUpdates; } - else if (key == net->capability_ModelDesc) { flags |= SupportsModelDescriptions; } + if (*value == '1') + { + if (key == net->capability_AtcInfo) { flags |= AcceptsAtisResponses; } + else if (key == net->capability_InterimPos) { flags |= SupportsInterimPosUpdates; } + else if (key == net->capability_ModelDesc) { flags |= SupportsModelDescriptions; } + } keysValues += 2; } emit cbvar_cast(cbvar)->capabilitiesQueryReplyReceived(cbvar_cast(cbvar)->fromFSD(callsign), flags);