Kaydet (Commit) 8ec33186 authored tarafından Caolán McNamara's avatar Caolán McNamara

make sure these are safe wrt embedded NULLs

something of a micro optimization as well I guess
üst dea0b22a
...@@ -298,7 +298,10 @@ public: ...@@ -298,7 +298,10 @@ public:
Return a OString instance reflecting the current content Return a OString instance reflecting the current content
of this OStringBuffer. of this OStringBuffer.
*/ */
const OString toString() const { return OString(pData->buffer); } const OString toString() const
{
return OString(pData->buffer, pData->length);
}
/** /**
The character at the specified index of this string buffer is set The character at the specified index of this string buffer is set
......
...@@ -278,7 +278,10 @@ public: ...@@ -278,7 +278,10 @@ public:
Return a OUString instance reflecting the current content Return a OUString instance reflecting the current content
of this OUStringBuffer. of this OUStringBuffer.
*/ */
const OUString toString() const { return OUString(pData->buffer); } const OUString toString() const
{
return OUString(pData->buffer, pData->length);
}
/** /**
The character at the specified index of this string buffer is set The character at the specified index of this string buffer is set
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment