Skip to content

Commit 291628b

Browse files
committed
add function under test/cfg
1 parent 4ff8304 commit 291628b

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

test/cfg/windows.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1238,3 +1238,15 @@ void constParameterPointer_SetupDiGetDeviceInstanceId(HDEVINFO info, SP_DEVINFO_
12381238
TCHAR buffer[buffer_size];
12391239
SetupDiGetDeviceInstanceId(info, data, buffer, buffer_size, NULL);
12401240
}
1241+
1242+
int invalidPrintfArgType_sprintf_s_l()
1243+
{
1244+
double value = 3.14;
1245+
const size_t buffer_size = 64;
1246+
char buffer[buffer_size];
1247+
int precision = 2;
1248+
_locale_t locale = _create_locale(LC_ALL, "C");
1249+
_sprintf_s_l(buffer, buffer_size, "%.*f", locale, precision, value);
1250+
_free_locale(locale);
1251+
return 0;
1252+
}

0 commit comments

Comments
 (0)