mirror of
https://github.com/dgibson/dtc.git
synced 2025-12-08 20:55:18 -05:00
Fix display of hex char literals in device tree source format
The format specifier PRIx8 for unsigned integers was used with a signed character, yielding unexpected results with values >= 0x7F.
This commit is contained in:
parent
c001fc01a4
commit
bac9d17dbc
1 changed files with 1 additions and 1 deletions
|
|
@ -93,7 +93,7 @@ static void write_propval_string(FILE *f, const char *s, size_t len)
|
|||
if (isprint((unsigned char)c))
|
||||
fprintf(f, "%c", c);
|
||||
else
|
||||
fprintf(f, "\\x%02"PRIx8, c);
|
||||
fprintf(f, "\\x%02"PRIx8, (unsigned char)c);
|
||||
}
|
||||
}
|
||||
fprintf(f, "\"");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue