Kaynağa Gözat

Have tinytest tolerate systems where char has > 8 bytes

CID 1064418
Nick Mathewson 9 yıl önce
ebeveyn
işleme
7620c613e8
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. 1 1
      src/ext/tinytest.c

+ 1 - 1
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--)