Skip to content

Commit

Permalink
extend t_vswprintf_s for overlap
Browse files Browse the repository at this point in the history
glibc supports it now, apparently
  • Loading branch information
rurban committed Mar 8, 2024
1 parent c9d656e commit 5c2160d
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions tests/test_vswprintf_s.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,15 @@ int test_vswprintf_s(void) {
rc = vtwprintf_s(str1, 8, BOS(str1), L"%ls", &str1[7]);
/* overlapping implementation defined */
#if defined(__GLIBC__) || defined(_WIN32)
ERR(-ESNOSPC);
WEXPNULL(str1);
// both are valid
if (str1[0] == L'\0') {
WEXPNULL(str1);
ERR(-ESNOSPC);
} else if (wcscmp(str1, L"8901234") == 0) {
NOERR();
} else {
WEXPNULL(str1);
}
#else
NOERR();
/* WEXPSTR(str1, L"8901234"); or WEXPNULL(str1) */
Expand Down

0 comments on commit 5c2160d

Please sign in to comment.