We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent be7d423 commit c4b6d0eCopy full SHA for c4b6d0e
Sources/_TestingInternals/Versions.cpp
@@ -31,7 +31,9 @@ const char *swt_getTestingLibraryVersion(void) {
31
// Copy the first line from the C string into a C array so that we can
32
// return it from this closure.
33
std::array<char, std::size(version) + 1> result {};
34
- auto i = std::find(std::begin(version), std::end(version), '\n');
+ auto i = std::find_if(std::begin(version), std::end(version), [] (char c) {
35
+ return c == '\r' || c == '\n';
36
+ });
37
std::copy(std::begin(version), i, result.begin());
38
return result;
39
}();
0 commit comments