diff options
author | khali <khali> | 2011-11-18 14:53:58 +0000 |
---|---|---|
committer | khali <khali> | 2011-11-18 14:53:58 +0000 |
commit | 685fd0e6661c50abb37ba2bee42930629f834c5c (patch) | |
tree | d08b56235ffc0deadb07ec3df0951a297d2e9b6f | |
parent | 6c46f8efc842b488a4bc2b5b9f13395669050f57 (diff) | |
download | dmidecode-685fd0e6661c50abb37ba2bee42930629f834c5c.tar.gz |
dmidecode.c: Properly print the hexadecimal value of invalid string
characters.
-rw-r--r-- | CHANGELOG | 5 | ||||
-rw-r--r-- | dmidecode.c | 2 |
2 files changed, 6 insertions, 1 deletions
@@ -1,3 +1,8 @@ +2011-11-18 Jean Delvare <khali@linux-fr.org> + + * dmidecode.c: Properly print the hexadecimal value of invalid + string characters. + 2011-11-14 Anton Arapov <anton@redhat.com> * dmidecode.c: Make dmi_chassis_type aware of the lock bit. diff --git a/dmidecode.c b/dmidecode.c index a702e5b..ce324a1 100644 --- a/dmidecode.c +++ b/dmidecode.c @@ -197,7 +197,7 @@ static void dmi_dump(const struct dmi_header *h, const char *prefix) printf("%s\t", prefix); for (j = 0; j < 16 && j < l - (row << 4); j++) printf("%s%02X", j ? " " : "", - s[(row << 4) + j]); + (unsigned char)s[(row << 4) + j]); printf("\n"); } /* String isn't filtered yet so do it now */ |