mirror of
https://github.com/scummvm/scummvm-tools.git
synced 2026-05-21 05:40:44 +00:00
COMMON: Initialize the String class for the std::string case
Otherwise, initWithCStr() will have nowhere to copy the string data to, and will probably crash.
This commit is contained in:
+1
-1
@@ -101,7 +101,7 @@ String::String(const String &str)
|
||||
assert(_str != 0);
|
||||
}
|
||||
|
||||
String::String(const std::string &str) {
|
||||
String::String(const std::string &str) : _size(0), _str(_storage) {
|
||||
initWithCStr(str.c_str(), str.size());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user