[Scummvm-git-logs] scummvm-tools master -> ef484a16b4e7fdc5e76de1b2651b5accfd318436
eriktorbjorn
eriktorbjorn at telia.com
Mon Apr 9 07:25:57 CEST 2018
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm-tools' repo located at https://github.com/scummvm/scummvm-tools .
Summary:
ef484a16b4 COMMON: Initialize the String class for the std::string case
Commit: ef484a16b4e7fdc5e76de1b2651b5accfd318436
https://github.com/scummvm/scummvm-tools/commit/ef484a16b4e7fdc5e76de1b2651b5accfd318436
Author: Torbjörn Andersson (d91tan at jehu)
Date: 2018-04-09T07:23:24+02:00
Commit Message:
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.
Changed paths:
common/str.cpp
diff --git a/common/str.cpp b/common/str.cpp
index 5bd0c36..3bdccec 100644
--- a/common/str.cpp
+++ b/common/str.cpp
@@ -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());
}
More information about the Scummvm-git-logs
mailing list