bpo-45666: fixes warning with `swprintf` and `%s` (GH-29307)

This commit is contained in:
Nikita Sobolev 2021-10-31 05:13:54 +03:00 committed by GitHub
parent aae18a1740
commit aad48062ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -0,0 +1 @@
Fix warning of ``swprintf`` and ``%s`` usage in ``_testembed.c``

View File

@ -1733,7 +1733,7 @@ static int check_use_frozen_modules(const char *rawval)
if (rawval == NULL) {
wcscpy(optval, L"frozen_modules");
}
else if (swprintf(optval, 100, L"frozen_modules=%s", rawval) < 0) {
else if (swprintf(optval, 100, L"frozen_modules=%S", rawval) < 0) {
error("rawval is too long");
return -1;
}