diff options
Diffstat (limited to 'src/pal/tests/palsuite/c_runtime/wcscpy/test1')
-rw-r--r-- | src/pal/tests/palsuite/c_runtime/wcscpy/test1/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/pal/tests/palsuite/c_runtime/wcscpy/test1/test1.cpp (renamed from src/pal/tests/palsuite/c_runtime/wcscpy/test1/test1.c) | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/pal/tests/palsuite/c_runtime/wcscpy/test1/CMakeLists.txt b/src/pal/tests/palsuite/c_runtime/wcscpy/test1/CMakeLists.txt index 5f21b829ee..872b2dec5e 100644 --- a/src/pal/tests/palsuite/c_runtime/wcscpy/test1/CMakeLists.txt +++ b/src/pal/tests/palsuite/c_runtime/wcscpy/test1/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(SOURCES - test1.c + test1.cpp ) add_executable(paltest_wcscpy_test1 diff --git a/src/pal/tests/palsuite/c_runtime/wcscpy/test1/test1.c b/src/pal/tests/palsuite/c_runtime/wcscpy/test1/test1.cpp index 4e45c86516..2ecafa8307 100644 --- a/src/pal/tests/palsuite/c_runtime/wcscpy/test1/test1.c +++ b/src/pal/tests/palsuite/c_runtime/wcscpy/test1/test1.cpp @@ -15,7 +15,7 @@ #include <palsuite.h> /* - * Notes: uses memcmp and sprintf. + * Notes: uses memcmp and sprintf_s. */ int __cdecl main(int argc, char *argv[]) @@ -37,7 +37,7 @@ int __cdecl main(int argc, char *argv[]) if (ret != dest || memcmp(dest, result, sizeof(result)) != 0) { - sprintf(buffer, "%S", dest); + sprintf_s(buffer, _countof(buffer), "%S", dest); Fail("Expected wcscpy to give \"%s\" with a return value of %p, got \"%s\" " "with a return value of %p.\n", "foo", dest, buffer, ret); } |