From: Bruno Haible Date: Fri, 14 May 2004 17:55:36 +0000 (+0000) Subject: Fix bug occurring with "%2.f". X-Git-Tag: v0.14.2~261 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8def364bc76a8c9c03b3ae019bc1aa9f013c60f2;p=thirdparty%2Fgettext.git Fix bug occurring with "%2.f". --- diff --git a/gettext-runtime/intl/ChangeLog b/gettext-runtime/intl/ChangeLog index 365327ade..29ccf0b08 100644 --- a/gettext-runtime/intl/ChangeLog +++ b/gettext-runtime/intl/ChangeLog @@ -1,3 +1,9 @@ +2004-05-14 Bruno Haible + + * vasnprintf.c (VASNPRINTF): Correctly handle the case of a precision + that consists of a '.' followed by an empty digit string. + Patch by Tor Lillqvist . + 2004-04-28 Bruno Haible * dcigettext.c (ISSLASH, IS_ABSOLUTE_PATH, IS_PATH_WITH_DIR): Treat diff --git a/gettext-runtime/intl/vasnprintf.c b/gettext-runtime/intl/vasnprintf.c index 8a62282d7..fc4a23039 100644 --- a/gettext-runtime/intl/vasnprintf.c +++ b/gettext-runtime/intl/vasnprintf.c @@ -1,5 +1,5 @@ /* vsprintf with automatic memory allocation. - Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc. + Copyright (C) 1999, 2002-2004 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published @@ -316,9 +316,8 @@ VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list ar const CHAR_T *digitp = dp->precision_start + 1; precision = 0; - do + while (digitp != dp->precision_end) precision = xsum (xtimes (precision, 10), *digitp++ - '0'); - while (digitp != dp->precision_end); } } diff --git a/gettext-runtime/libasprintf/ChangeLog b/gettext-runtime/libasprintf/ChangeLog index f0f2cf5ec..2512dbaef 100644 --- a/gettext-runtime/libasprintf/ChangeLog +++ b/gettext-runtime/libasprintf/ChangeLog @@ -1,3 +1,9 @@ +2004-05-14 Bruno Haible + + * vasnprintf.c (VASNPRINTF): Correctly handle the case of a precision + that consists of a '.' followed by an empty digit string. + Patch by Tor Lillqvist . + 2004-04-19 Bruno Haible * gettext.m4: Change jm_ to gl_ in all uses of AC_DEFINE'd names. diff --git a/gettext-runtime/libasprintf/vasnprintf.c b/gettext-runtime/libasprintf/vasnprintf.c index 8a62282d7..fc4a23039 100644 --- a/gettext-runtime/libasprintf/vasnprintf.c +++ b/gettext-runtime/libasprintf/vasnprintf.c @@ -1,5 +1,5 @@ /* vsprintf with automatic memory allocation. - Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc. + Copyright (C) 1999, 2002-2004 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published @@ -316,9 +316,8 @@ VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list ar const CHAR_T *digitp = dp->precision_start + 1; precision = 0; - do + while (digitp != dp->precision_end) precision = xsum (xtimes (precision, 10), *digitp++ - '0'); - while (digitp != dp->precision_end); } }