* lib/vasnprintf.c (VASNPRINTF): In the code for %lc in vasnprintf, test
for the FLAG_LEFT bit in the flags variable.
+2023-01-28 Bruno Haible <bruno@clisp.org>
+
+ vasnprintf-posix: Fix possible bug with negative width handling for %lc.
+ * lib/vasnprintf.c (VASNPRINTF): In the code for %lc in vasnprintf, test
+ for the FLAG_LEFT bit in the flags variable.
+
2023-01-28 Bruno Haible <bruno@clisp.org>
vasnprintf-posix: Fix negative width handling for %ls directive.
/* w doesn't matter. */
w = 0;
- if (w < width && !(dp->flags & FLAG_LEFT))
+ if (w < width && !(flags & FLAG_LEFT))
{
size_t n = width - w;
ENSURE_ALLOCATION (xsum (length, n));
length += tmpdst_len;
# endif
- if (w < width && (dp->flags & FLAG_LEFT))
+ if (w < width && (flags & FLAG_LEFT))
{
size_t n = width - w;
ENSURE_ALLOCATION (xsum (length, n));