1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-31 20:16:57 +00:00

Don't call front() on an empty string (#3520)

This commit is contained in:
Mike Gelfand 2022-07-25 00:01:42 +01:00 committed by GitHub
parent 9539484cdc
commit 4a18c503c7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1024,7 +1024,7 @@ TEST_F(FileTest, pathNativeSeparators)
for (auto const& test : tests)
{
auto buf = std::string(test.input);
char* const output = tr_sys_path_native_separators(&buf.front());
char* const output = tr_sys_path_native_separators(buf.data());
EXPECT_EQ(test.expected_output, output);
EXPECT_EQ(buf.data(), output);
}