mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-31 19:20:26 +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
@ -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…
x
Reference in New Issue
Block a user