Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/src/catch2/internal
diff options
context:
space:
mode:
authorTravis Wilson2020-08-31 17:19:56 -0700
committerMartin Hořeňovský2020-10-08 11:28:50 +0200
commitb0214ff862508ca77ce76b9028aaf8422d7083b9 (patch)
tree9d4301e0e70d40c6971f2d6bb22fe19368d42757 /src/catch2/internal
parent2454cfffb7eda9d0952b6b1b0f827c7cad232dd5 (diff)
downloadcatch3-b0214ff862508ca77ce76b9028aaf8422d7083b9.tar.gz
Make experimental capture work on Windows with read-write temp file behavior
Diffstat (limited to 'src/catch2/internal')
-rw-r--r--src/catch2/internal/catch_output_redirect.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/catch2/internal/catch_output_redirect.cpp b/src/catch2/internal/catch_output_redirect.cpp
index e8e9404f..49cfaa0d 100644
--- a/src/catch2/internal/catch_output_redirect.cpp
+++ b/src/catch2/internal/catch_output_redirect.cpp
@@ -64,7 +64,7 @@ namespace Catch {
if (tmpnam_s(m_buffer)) {
CATCH_RUNTIME_ERROR("Could not get a temp filename");
}
- if (fopen_s(&m_file, m_buffer, "w")) {
+ if (fopen_s(&m_file, m_buffer, "w+")) {
char buffer[100];
if (strerror_s(buffer, errno)) {
CATCH_RUNTIME_ERROR("Could not translate errno to a string");