mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-12 03:56:20 +00:00
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.
This commit is contained in:
parent
dea49f7a0a
commit
976d6564bc
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user