[Scummvm-git-logs] scummvm master -> 4cfbe0291916c99b7e0141bdf4c8c8229a09289f
dreammaster
dreammaster at scummvm.org
Tue Sep 19 03:29:35 CEST 2017
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
4cfbe02919 TTITANIC: Guard against TTstring items being self-assigned
Commit: 4cfbe0291916c99b7e0141bdf4c8c8229a09289f
https://github.com/scummvm/scummvm/commit/4cfbe0291916c99b7e0141bdf4c8c8229a09289f
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-09-18T21:29:29-04:00
Commit Message:
TTITANIC: Guard against TTstring items being self-assigned
Changed paths:
engines/titanic/true_talk/tt_string.cpp
diff --git a/engines/titanic/true_talk/tt_string.cpp b/engines/titanic/true_talk/tt_string.cpp
index 43910fc..d7e4e86 100644
--- a/engines/titanic/true_talk/tt_string.cpp
+++ b/engines/titanic/true_talk/tt_string.cpp
@@ -55,6 +55,10 @@ TTstring::~TTstring() {
}
void TTstring::operator=(const TTstring &str) {
+ if (&str == this)
+ // Trying to assign string to itself
+ return;
+
// Delete old string reference, if any
if (_data && --_data->_referenceCount == 0)
delete _data;
More information about the Scummvm-git-logs
mailing list