@@ -24,7 +24,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
24
24
#include " ../exceptions.h"
25
25
#include " ../irrlichttypes.h"
26
26
27
- #include < inttypes.h> // For PRIxN, cinttypes is C++11-only
28
27
#include < sstream>
29
28
#include < iomanip>
30
29
#include < vector>
@@ -417,20 +416,20 @@ bool serializeStructToString(std::string *outstr,
417
416
if (width == 16 ) {
418
417
bufpos += PADDING (bufpos, u16);
419
418
nprinted = snprintf (sbuf + pos, sbuflen,
420
- is_unsigned ? " %" PRIu16 " , " : " %" PRIi16 " , " ,
419
+ is_unsigned ? " %u , " : " %d , " ,
421
420
*((u16 *)bufpos));
422
421
bufpos += sizeof (u16);
423
422
} else if (width == 32 ) {
424
423
bufpos += PADDING (bufpos, u32);
425
424
nprinted = snprintf (sbuf + pos, sbuflen,
426
- is_unsigned ? " %" PRIu32 " , " : " %" PRIi32 " , " ,
425
+ is_unsigned ? " %u , " : " %d , " ,
427
426
*((u32 *)bufpos));
428
427
bufpos += sizeof (u32);
429
428
} else if (width == 64 ) {
430
429
bufpos += PADDING (bufpos, u64);
431
430
nprinted = snprintf (sbuf + pos, sbuflen,
432
- is_unsigned ? " %" PRIu64 " , " : " %" PRIi64 " , " ,
433
- *((u64 *)bufpos));
431
+ is_unsigned ? " %llu , " : " %lli , " ,
432
+ ( unsigned long long ) *((u64 *)bufpos));
434
433
bufpos += sizeof (u64);
435
434
}
436
435
break ;
0 commit comments