2000-12-06  Jim Wilson  <wilson@redhat.com>

	* stdlib/l64a.c (l64a): Truncate m to 32-bit value.
This commit is contained in:
Ulrich Drepper 2000-12-06 22:09:46 +00:00
parent 23a5c823a0
commit 9cf90923ca
2 changed files with 10 additions and 3 deletions

View File

@ -1,3 +1,7 @@
2000-12-06 Jim Wilson <wilson@redhat.com>
* stdlib/l64a.c (l64a): Truncate m to 32-bit value.
2000-12-06 Ulrich Drepper <drepper@redhat.com> 2000-12-06 Ulrich Drepper <drepper@redhat.com>
* stdio-common/printf_fp.c (__printf_fp): Handle decimal point in * stdio-common/printf_fp.c (__printf_fp): Handle decimal point in

View File

@ -1,4 +1,4 @@
/* Copyright (C) 1995, 1996 Free Software Foundation, Inc. /* Copyright (C) 1995, 1996, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995. Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
@ -40,13 +40,16 @@ l64a (n)
static char result[7]; static char result[7];
int cnt; int cnt;
if (m == 0l) /* The standard says that only 32 bits are used. */
m &= 0xffffffff;
if (m == 0ul)
/* The value for N == 0 is defined to be the empty string. */ /* The value for N == 0 is defined to be the empty string. */
return (char *) ""; return (char *) "";
result[6] = '\0'; result[6] = '\0';
for (cnt = 5; m > 0; --cnt) for (cnt = 5; m > 0ul; --cnt)
{ {
result[cnt] = conv_table[m & 0x3f]; result[cnt] = conv_table[m & 0x3f];
m >>= 6; m >>= 6;