summaryrefslogtreecommitdiff
path: root/src/network/core/os_abstraction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/core/os_abstraction.cpp')
-rw-r--r--src/network/core/os_abstraction.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/core/os_abstraction.cpp b/src/network/core/os_abstraction.cpp
index b2d3475d0..202806a34 100644
--- a/src/network/core/os_abstraction.cpp
+++ b/src/network/core/os_abstraction.cpp
@@ -76,7 +76,7 @@ bool NetworkError::IsConnectInProgress() const
* Get the string representation of the error message.
* @return The string representation that will get overwritten by next calls.
*/
-const char *NetworkError::AsString() const
+const std::string &NetworkError::AsString() const
{
if (this->message.empty()) {
#if defined(_WIN32)
@@ -97,7 +97,7 @@ const char *NetworkError::AsString() const
this->message.assign(strerror(this->error));
#endif
}
- return this->message.c_str();
+ return this->message;
}
/**