[Scummvm-git-logs] scummvm master -> 54b0b4ac4cd4a42de660ea426edb27840ddfd4f0

phcoder phcoder at gmail.com
Tue Nov 3 10:22:01 UTC 2020


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:
54b0b4ac4c COMMON: Restore old behaviour for appending char to string


Commit: 54b0b4ac4cd4a42de660ea426edb27840ddfd4f0
    https://github.com/scummvm/scummvm/commit/54b0b4ac4cd4a42de660ea426edb27840ddfd4f0
Author: Vladimir Serbinenko (phcoder at google.com)
Date: 2020-11-03T11:19:20+01:00

Commit Message:
COMMON: Restore old behaviour for appending char to string

Appending \0 to string and expecting it to be just dropped is
still an invalid behaviour but it already happened in 2 engines, so
restore old behaviour, at least for now

Changed paths:
    common/base-str.cpp


diff --git a/common/base-str.cpp b/common/base-str.cpp
index 0566821420..2439c2931a 100644
--- a/common/base-str.cpp
+++ b/common/base-str.cpp
@@ -731,6 +731,8 @@ TEMPLATE void BASESTRING::trim() {
 #endif
 
 TEMPLATE void BASESTRING::assignAppend(value_type c) {
+	if (c == 0)
+		return;
 	ensureCapacity(_size + 1, true);
 
 	_str[_size++] = c;




More information about the Scummvm-git-logs mailing list