From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on sa.int.altlinux.org X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 From: Michael Schutte To: kbd@lists.altlinux.org Date: Wed, 13 Oct 2010 17:07:26 +0200 Message-Id: <1286982446-15811-1-git-send-email-michi@uiae.at> X-Mailer: git-send-email 1.7.1 Subject: [kbd] [PATCH] Fix "compose as usual" for Unicode diacritics X-BeenThere: kbd@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: Linux console tools development discussion List-Id: Linux console tools development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Oct 2010 15:07:41 -0000 Archived-At: List-Archive: struct ccc in compose_as_usua[() uses three char members of unspecified signedness; in case the compiler decides that they should be signed, negative integers will end up in the accent table for c3 > 127. Avoid the problem by explicitly using unsigned chars. Signed-off-by: Michael Schutte --- src/loadkeys.y | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/loadkeys.y b/src/loadkeys.y index c8bb7cc..cc7e2ab 100644 --- a/src/loadkeys.y +++ b/src/loadkeys.y @@ -1181,7 +1181,7 @@ compose_as_usual(char *charset) { exit(1); } else { struct ccc { - char c1, c2, c3; + unsigned char c1, c2, c3; } def_latin1_composes[68] = { { '`', 'A', 0300 }, { '`', 'a', 0340 }, { '\'', 'A', 0301 }, { '\'', 'a', 0341 }, -- 1.7.1