From fe7af042b90fc5b899cd8636f9464560df44afae Mon Sep 17 00:00:00 2001 From: petermcs Date: Sun, 2 Oct 2011 20:19:07 +0000 Subject: [PATCH] Array index is now unsigned so > 0 test will not work. Use explicit check for BACNET_ARRAY_ALL instead. --- bacnet-stack/src/bacdevobjpropref.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bacnet-stack/src/bacdevobjpropref.c b/bacnet-stack/src/bacdevobjpropref.c index 841c3d60..f5c11b03 100644 --- a/bacnet-stack/src/bacdevobjpropref.c +++ b/bacnet-stack/src/bacdevobjpropref.c @@ -1,4 +1,4 @@ -/*####COPYRIGHTBEGIN#### +index/*####COPYRIGHTBEGIN#### ------------------------------------------- Copyright (C) 2008 John Minack @@ -78,7 +78,7 @@ int bacapp_encode_device_obj_property_ref( apdu_len += len; /* Array index is optional so check if needed before inserting */ - if (value->arrayIndex > 0) { + if (value->arrayIndex != BACNET_ARRAY_ALL) { len = encode_context_unsigned(&apdu[apdu_len], 2, value->arrayIndex); apdu_len += len; }