diff options
author | Nick Mathewson <nickm@torproject.org> | 2015-02-17 08:40:55 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-02-17 08:40:55 -0500 |
commit | 7620c613e8bdaa34120136c91f71ae0cf8cb8506 (patch) | |
tree | 14a5ee6f97b13eacb19a6c99cf4d32ee01febda6 /src/ext | |
parent | c3813e2e64e7efa6c07fc5741f94a2f6876bc317 (diff) | |
download | tor-7620c613e8bdaa34120136c91f71ae0cf8cb8506.tar.gz tor-7620c613e8bdaa34120136c91f71ae0cf8cb8506.zip |
Have tinytest tolerate systems where char has > 8 bytes
CID 1064418
Diffstat (limited to 'src/ext')
-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--) |