]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Fix bug occurring with "%2.f".
authorBruno Haible <bruno@clisp.org>
Fri, 14 May 2004 17:55:36 +0000 (17:55 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:11:51 +0000 (12:11 +0200)
gettext-runtime/intl/ChangeLog
gettext-runtime/intl/vasnprintf.c
gettext-runtime/libasprintf/ChangeLog
gettext-runtime/libasprintf/vasnprintf.c

index 365327ade89331eb80f88d4dcd967129ba56b624..29ccf0b080ae6bd0db7f25f57d37f680ba0949a7 100644 (file)
@@ -1,3 +1,9 @@
+2004-05-14  Bruno Haible  <bruno@clisp.org>
+
+       * vasnprintf.c (VASNPRINTF): Correctly handle the case of a precision
+       that consists of a '.' followed by an empty digit string.
+       Patch by Tor Lillqvist <tml@iki.fi>.
+
 2004-04-28  Bruno Haible  <bruno@clisp.org>
 
        * dcigettext.c (ISSLASH, IS_ABSOLUTE_PATH, IS_PATH_WITH_DIR): Treat
index 8a62282d73e4aec341776bac1605e6abf8ad1ff7..fc4a23039f783f5ee69367236376aa88dd3df0b6 100644 (file)
@@ -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);
                        }
                    }
 
index f0f2cf5eceda9e334998c886d5c29ae9801406e3..2512dbaef6189957cd3293e2e89a156f2320bfc4 100644 (file)
@@ -1,3 +1,9 @@
+2004-05-14  Bruno Haible  <bruno@clisp.org>
+
+       * vasnprintf.c (VASNPRINTF): Correctly handle the case of a precision
+       that consists of a '.' followed by an empty digit string.
+       Patch by Tor Lillqvist <tml@iki.fi>.
+
 2004-04-19  Bruno Haible  <bruno@clisp.org>
 
        * gettext.m4: Change jm_ to gl_ in all uses of AC_DEFINE'd names.
index 8a62282d73e4aec341776bac1605e6abf8ad1ff7..fc4a23039f783f5ee69367236376aa88dd3df0b6 100644 (file)
@@ -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);
                        }
                    }