Sequence: add missing handling of integer encoding
[babeltrace.git] / formats / ctf-text / types / integer.c
index 3d1c459fd91b9259949526200e469b75d273c206..457ea804e5133ca1e32488e857b2ad6b0369da9e 100644 (file)
@@ -40,6 +40,20 @@ int ctf_text_integer_write(struct stream_pos *ppos, struct definition *definitio
                fprintf(pos->fp, "%s = ",
                        g_quark_to_string(definition->name));
 
+       if (pos->string
+           && (integer_declaration->encoding == CTF_STRING_ASCII
+             || integer_declaration->encoding == CTF_STRING_UTF8)) {
+
+               if (!integer_declaration->signedness) {
+                       g_string_append_c(pos->string,
+                               (int) integer_definition->value._unsigned);
+               } else {
+                       g_string_append_c(pos->string,
+                               (int) integer_definition->value._signed);
+               }
+               return 0;
+       }
+
        switch (integer_declaration->base) {
        case 0: /* default */
        case 10:
This page took 0.024768 seconds and 4 git commands to generate.