length_type = container_of(length_field->type,
struct bt_ctf_field_type_integer, parent);
+ /* The length field must be unsigned */
if (length_type->declaration.signedness) {
ret = -1;
goto end;
enumeration_type = container_of(field->type,
struct bt_ctf_field_type_enumeration, parent);
- if (integer_type->declaration.signedness) {
+ if (!integer_type->declaration.signedness) {
uint64_t value;
ret = bt_ctf_field_unsigned_integer_get_value(container,
&value);