Package: ascii / 3.18-5

handle_bytes_on_signed_char Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Correctly handle bytes with the highest bit set on system with signed char.

From: Jakub Wilk <jwilk@jwilk.net>
--- a/ascii.c
+++ b/ascii.c
@@ -224,7 +224,7 @@
 
     /* interpret single characters as themselves */
     if (len == 1) { 
-	speak((unsigned int)str[0]); 
+	speak((unsigned char)str[0]); 
 	/* also interpret single digits as numeric */
 	if(!line && strchr("0123456789ABCDEFabcdef",str[0])) {
 	    int hval;