COMMON: Fix creating a String from a U32String
There were memory issues due to class member variables not initialized by the constructor.
This commit is contained in:
parent
733df0bfa1
commit
94035cf7aa
1 changed files with 3 additions and 1 deletions
|
@ -125,7 +125,9 @@ String::String(char c)
|
|||
_size = (c == 0) ? 0 : 1;
|
||||
}
|
||||
|
||||
String::String(const U32String &str) {
|
||||
String::String(const U32String &str)
|
||||
: _size(0), _str(_storage) {
|
||||
_storage[0] = 0;
|
||||
*this = String(str.encode());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue