+ char dec_size[16]; + int dec_size_len; + size_t offset; + section = &dxbc_desc->sections[i]; - printf("%s%2zu%s %08x (%.4s) 0x%08zx (%zu) bytes\n", + dec_size_len = sprintf(dec_size, "%zu", section->data.size);
I suppose that's safe, but only because we happen to know that the format limits section sizes to 32 bits in practice.
If we're going to do something like this anyway, we might as well do something like this: ```c sprintf(dec_size, "(%zu)", section->data.size); ... printf("... 0x%08zx %-13s 0x%08zx ...\n", ..., section->data.size, dec_size, offset, ...); ```