]> Savannah Git Hosting - gnulib.git/commit
vasnprintf-posix: Fix possible bug with negative width handling for %lc.
authorBruno Haible <bruno@clisp.org>
Sat, 28 Jan 2023 18:05:24 +0000 (19:05 +0100)
committerBruno Haible <bruno@clisp.org>
Sat, 28 Jan 2023 18:05:24 +0000 (19:05 +0100)
commit54c80fb6f106d7f3430dd075fcb7327bab07f368
tree66bfca33cdc8bbf5a4031a53020abf7159d97d06
parent5527d5c548702b89d217bbe58036996066a709b6
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.
* tests/test-vasnprintf-posix.c (test_function): Add tests for width
given as argument for the directives %c, %lc.
* tests/test-vasprintf-posix.c (test_function): Likewise.
* tests/test-snprintf-posix.h (test_function): Likewise.
* tests/test-sprintf-posix.h (test_function): Likewise.
* tests/test-snprintf-posix.c: Include <wchar.h>, for wint_t.
* tests/test-sprintf-posix.c: Likewise.
ChangeLog
lib/vasnprintf.c
tests/test-snprintf-posix.c
tests/test-snprintf-posix.h
tests/test-sprintf-posix.c
tests/test-sprintf-posix.h
tests/test-vasnprintf-posix.c
tests/test-vasprintf-posix.c