Array index is now unsigned so > 0 test will not work. Use explicit check for BACNET_ARRAY_ALL instead.

This commit is contained in:
petermcs
2011-10-02 20:19:07 +00:00
parent 7eb2109dc4
commit fe7af042b9
+2 -2
View File
@@ -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;
}