diff options
Diffstat (limited to 'src/ext/tinytest.c')
-rw-r--r-- | src/ext/tinytest.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ext/tinytest.c b/src/ext/tinytest.c index cc054ad340..f6baeeb9a5 100644 --- a/src/ext/tinytest.c +++ b/src/ext/tinytest.c @@ -490,7 +490,7 @@ tinytest_format_hex_(const void *val_, unsigned long len) return strdup("<allocation failure>"); cp = result; for (i=0;i<len;++i) { - *cp++ = "0123456789ABCDEF"[val[i] >> 4]; + *cp++ = "0123456789ABCDEF"[(val[i] >> 4)&0x0f]; *cp++ = "0123456789ABCDEF"[val[i] & 0x0f]; } while (ellipses--) |