mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-20 20:09:41 +00:00
Make sure MultiChar::data() constructs a valid string
mData may ultimately not be a valid C-string (e.g. if it contains 4 significant characters) so it may not necessarily be converted into a valid std::string
This commit is contained in:
parent
5ede09a6cd
commit
a8843fa5a8
1 changed files with 2 additions and 1 deletions
|
@ -165,7 +165,8 @@ namespace Compiler
|
|||
|
||||
std::string data()
|
||||
{
|
||||
return mData;
|
||||
// NB: mLength is the number of the last element in the array
|
||||
return std::string(mData, mLength + 1);
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
Loading…
Reference in a new issue