[Scummvm-git-logs] scummvm master -> 976d6564bcba0bb0936d29d52023321ba89aeb08
eriktorbjorn
eriktorbjorn at telia.com
Tue Jul 13 08:35:46 UTC 2021
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:
976d6564bc COMMON: Allow \0 to be appended to Strings
Commit: 976d6564bcba0bb0936d29d52023321ba89aeb08
https://github.com/scummvm/scummvm/commit/976d6564bcba0bb0936d29d52023321ba89aeb08
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2021-07-13T10:35:19+02:00
Commit Message:
COMMON: Allow \0 to be appended to Strings
This has been discussed on the mailing list. While there wasn't much
input, the consensus was that it should be allowed for consistency with
std::string.
While most engines don't do this, it is possible that some engines will
break because of it. (A few have already been fixed.) But it will also
repear the currently broken ADL engine. For now, the warning() message
will remain so that it can be investigated on a case-by-case basis.
Changed paths:
common/base-str.cpp
diff --git a/common/base-str.cpp b/common/base-str.cpp
index 6c1a80d53d..cbe38eb9be 100644
--- a/common/base-str.cpp
+++ b/common/base-str.cpp
@@ -726,9 +726,8 @@ TEMPLATE void BASESTRING::trim() {
TEMPLATE void BASESTRING::assignAppend(value_type c) {
if (c == 0) {
#ifndef SCUMMVM_UTIL
- warning("Adding \\0 to String is currently not well defined");
+ warning("Adding \\0 to String. This is permitted, but can have unwanted consequences. (This warning will be removed later.)");
#endif
- return;
}
ensureCapacity(_size + 1, true);
More information about the Scummvm-git-logs
mailing list