From: Ulrich Drepper Date: Mon, 26 Jul 1999 16:48:22 +0000 (+0000) Subject: Update. X-Git-Tag: upstream/2.30~26970 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=eea35053ac65bbe7686dd5e2f3d1afe938311ff9;p=external%2Fglibc.git Update. * wcsmbs/wctob.c: Avoid sign extension when returning character. Reported by Bruno Haible . --- diff --git a/ChangeLog b/ChangeLog index 513ae2c..5776a37 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 1999-07-26 Ulrich Drepper + * wcsmbs/wctob.c: Avoid sign extension when returning character. + Reported by Bruno Haible . + * wcsmbs/wcsrtombs.c (__wcsrtombs): When computing maximum number of wide characters to convert do it right and don't overestimate by multiplying with MB_CUR_MAX. diff --git a/wcsmbs/wctob.c b/wcsmbs/wctob.c index 565cbea..97a36f8 100644 --- a/wcsmbs/wctob.c +++ b/wcsmbs/wctob.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. @@ -62,5 +62,5 @@ wctob (c) || data.__outbuf != (unsigned char *) (buf + 1)) return EOF; - return buf[0]; + return (unsigned char) buf[0]; }