Browse Source

Improved access to variable for better readability

Stefan Profanter 8 years ago
parent
commit
693f8cdad8
1 changed files with 1 additions and 1 deletions
  1. 1 1
      tests/check_types_custom.c

+ 1 - 1
tests/check_types_custom.c

@@ -132,7 +132,7 @@ START_TEST(parseCustomArray) {
     ck_assert_int_eq(var2.arrayLength, 10);
 
     for (size_t i = 0; i < 10; i++) {
-        UA_ExtensionObject *eo = (UA_ExtensionObject*)&var2.data[i];
+        UA_ExtensionObject *eo = &((UA_ExtensionObject*)var2.data)[i];
         ck_assert_int_eq(eo->encoding, UA_EXTENSIONOBJECT_DECODED);
         ck_assert_ptr_eq(eo->content.decoded.type, &PointType);
         Point *p2 = (Point*)eo->content.decoded.data;