From e099079cc074f23ebb957c524453b3a8851b6c9d Mon Sep 17 00:00:00 2001 From: "tridge60@gmail.com" Date: Sun, 4 Sep 2011 06:39:40 +0000 Subject: [PATCH] AP_Var: fixed a logic bug in APVar::key() We were using && instead of & for a bit check. Thanks to Mike for spotting this! Pair-Programmed-With: Mike Smith git-svn-id: https://arducopter.googlecode.com/svn/trunk@3232 f9c3cf11-9bcb-44bc-f272-b75c42450872 --- libraries/AP_Common/AP_Var.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_Common/AP_Var.cpp b/libraries/AP_Common/AP_Var.cpp index 34fabce6d5..ffe09e658a 100644 --- a/libraries/AP_Common/AP_Var.cpp +++ b/libraries/AP_Common/AP_Var.cpp @@ -338,7 +338,7 @@ AP_Var::key(void) if (_group) { // group members don't have keys return k_key_none; } - if (_key && k_key_not_located) { // if not located, key is in memory + if (_key & k_key_not_located) { // if not located, key is in memory return _key & k_key_mask; }