Changed the return type of strdup() to const char* (issue #658)

This commit is contained in:
Benoit Blanchon committed 2018-01-14 14:01:08 +01:00
1 parent e92612b511
commit ae0b7a3ebd
4 files changed
+8 -7

No files matched your search

+1 -1
View File
@@ -243,7 +243,7 @@ TEST_CASE("std::string") {
SECTION("JsonBuffer_strdup") {
std::string original("hello");
char *copy = jb.strdup(original);
const char *copy = jb.strdup(original);
original[0] = 'w';
REQUIRE(std::string("hello") == copy);
}