diff --git a/include/yaml-cpp/exceptions.h b/include/yaml-cpp/exceptions.h index ecf870a7e56d8007deed3d951c14a61c3a8d37b6..eef22833a81349cddb728e45f25d1a27bf652f06 100644 --- a/include/yaml-cpp/exceptions.h +++ b/include/yaml-cpp/exceptions.h @@ -160,7 +160,7 @@ class YAML_CPP_API Exception : public std::runtime_error { static const std::string build_what(const Mark& mark, const std::string& msg) { if (mark.is_null()) { - return msg.c_str(); + return msg; } std::stringstream output;