Array index is now unsigned so > 0 test will not work. Use explicit check for BACNET_ARRAY_ALL instead.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user