StringTableOff is a uint32_t. However, here, we print it as a signed decimal (%d), which is wrong.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
Neither is correct. It should be casted either to uintmax_t and printed with %ju or PRIu32 be used. The fancy new formatting system might also work of course, but won't give you a C string.
That said, this should also be changed to use snprintf...
Comment Actions
I'd probably just cast to unsigned long and use lu. Using sprintf with (size_t)COFF::NameSize is indeed better.
Comment Actions
I assume you made a typo in your comment @ruiu, and meant snprintf
Sorry for updating after you approved, I didn't notice!