diff --git a/bacnet-stack/bacapp.c b/bacnet-stack/bacapp.c index 757ef837..cc8dd202 100644 --- a/bacnet-stack/bacapp.c +++ b/bacnet-stack/bacapp.c @@ -306,7 +306,7 @@ bool bacapp_compare(BACNET_APPLICATION_DATA_VALUE * value, status = false; break; case BACNET_APPLICATION_TAG_CHARACTER_STRING: - status = !characterstring_same(&value->type.Character_String, + status = characterstring_same(&value->type.Character_String, &test_value->type.Character_String); break; case BACNET_APPLICATION_TAG_BIT_STRING: diff --git a/bacnet-stack/bacapp.ide b/bacnet-stack/bacapp.ide index 6ac399ae..fe9c1f2a 100644 Binary files a/bacnet-stack/bacapp.ide and b/bacnet-stack/bacapp.ide differ diff --git a/bacnet-stack/bacdcode.c b/bacnet-stack/bacdcode.c index 9ca0b00c..b08420e8 100644 --- a/bacnet-stack/bacdcode.c +++ b/bacnet-stack/bacdcode.c @@ -1704,7 +1704,7 @@ void testBACDCodeSignedValue(Test * pTest, int32_t value) { uint8_t array[5] = { 0 }; uint8_t encoded_array[5] = { 0 }; - int decoded_value = 0; + long decoded_value = 0; int len = 0, apdu_len = 0; uint8_t apdu[MAX_APDU] = { 0 }; uint8_t tag_number = 0; @@ -1717,14 +1717,14 @@ void testBACDCodeSignedValue(Test * pTest, int32_t value) ct_test(pTest, tag_number == BACNET_APPLICATION_TAG_SIGNED_INT); ct_test(pTest, decoded_value == value); if (decoded_value != value) { - printf("value=%d decoded_value=%d\n", value, decoded_value); + printf("value=%d decoded_value=%ld\n", value, decoded_value); print_apdu(&array[0], sizeof(array)); } encode_tagged_signed(&encoded_array[0], decoded_value); diff = memcmp(&array[0], &encoded_array[0], sizeof(array)); ct_test(pTest, diff == 0); if (diff) { - printf("value=%d decoded_value=%d\n", value, decoded_value); + printf("value=%d decoded_value=%ld\n", value, decoded_value); print_apdu(&array[0], sizeof(array)); print_apdu(&encoded_array[0], sizeof(array)); }