[Scummvm-git-logs] scummvm branch-2-7-0-android -> 4b24414b1d42c8ab403cd828867561b24e9be1da
sev-
noreply at scummvm.org
Fri Mar 3 22:46:49 UTC 2023
This automated email contains information about 4 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
a765fef0ef GLK: ADRIFT: Disable non-safe assert
136d1b23c0 COMMON: Split assert() for more finetuned crash reporting
9fcb33a5e6 COMMON: Do not crash on attempt to punyencode empty strings
4b24414b1d AUDIO: Do not crash if MT32 driver is not fully initialized
Commit: a765fef0eff254c8707faa313c38ae6eee632f6f
https://github.com/scummvm/scummvm/commit/a765fef0eff254c8707faa313c38ae6eee632f6f
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-03-03T23:46:03+01:00
Commit Message:
GLK: ADRIFT: Disable non-safe assert
This assert depends on static variable which could lead to a crash
in case we re-enter the engine for some reason. Triggered on Android
Changed paths:
engines/glk/adrift/os_glk.cpp
diff --git a/engines/glk/adrift/os_glk.cpp b/engines/glk/adrift/os_glk.cpp
index 40814d2009e..0f17d64a87e 100644
--- a/engines/glk/adrift/os_glk.cpp
+++ b/engines/glk/adrift/os_glk.cpp
@@ -3085,7 +3085,7 @@ bool adrift_startup_code(Common::SeekableReadStream *gameFile) {
const char *locale;
sc_uint trace_flags;
sc_bool enable_debugger, stable_random;
- assert(!gsc_startup_called);
+ //assert(!gsc_startup_called);
gsc_startup_called = TRUE;
assert(gameFile);
Commit: 136d1b23c04238c0bda8bf7612c940a592c287f0
https://github.com/scummvm/scummvm/commit/136d1b23c04238c0bda8bf7612c940a592c287f0
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-03-03T23:46:16+01:00
Commit Message:
COMMON: Split assert() for more finetuned crash reporting
Changed paths:
common/str-base.h
diff --git a/common/str-base.h b/common/str-base.h
index 3c36abeb4b6..9fb35571a33 100644
--- a/common/str-base.h
+++ b/common/str-base.h
@@ -175,7 +175,9 @@ public:
value_type lastChar() const { return (_size > 0) ? _str[_size - 1] : 0; }
value_type operator[](int idx) const {
- assert(_str && idx >= 0 && idx < (int)_size);
+ assert(_str);
+ assert(idx >= 0);
+ assert(idx < (int)_size);
return _str[idx];
}
Commit: 9fcb33a5e624a683b458a3156267df3dc17d460d
https://github.com/scummvm/scummvm/commit/9fcb33a5e624a683b458a3156267df3dc17d460d
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-03-03T23:46:27+01:00
Commit Message:
COMMON: Do not crash on attempt to punyencode empty strings
Changed paths:
common/punycode.cpp
diff --git a/common/punycode.cpp b/common/punycode.cpp
index c894db4c002..60f8caab326 100644
--- a/common/punycode.cpp
+++ b/common/punycode.cpp
@@ -132,6 +132,9 @@ String punycode_encode(const U32String &src) {
size_t h = 0, si;
String dst = "xn--";
+ if (!srclen)
+ return src;
+
for (si = 0; si < srclen; si++) {
if (src[si] < 128) {
dst += src[si];
@@ -204,6 +207,9 @@ bool punycode_hasprefix(const String &src) {
}
bool punycode_needEncode(const String &src) {
+ if (!src.size())
+ return false;
+
for (uint si = 0; si < src.size(); si++) {
if (src[si] & 0x80 || src[si] < 0x20 || strchr(SPECIAL_SYMBOLS, src[si])) {
return true;
Commit: 4b24414b1d42c8ab403cd828867561b24e9be1da
https://github.com/scummvm/scummvm/commit/4b24414b1d42c8ab403cd828867561b24e9be1da
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-03-03T23:46:37+01:00
Commit Message:
AUDIO: Do not crash if MT32 driver is not fully initialized
Changed paths:
audio/mt32gm.cpp
diff --git a/audio/mt32gm.cpp b/audio/mt32gm.cpp
index d4500e11e30..626580b717d 100644
--- a/audio/mt32gm.cpp
+++ b/audio/mt32gm.cpp
@@ -973,6 +973,9 @@ void MidiDriver_MT32GM::metaEvent(int8 source, byte type, byte *data, uint16 len
}
void MidiDriver_MT32GM::stopAllNotes(bool stopSustainedNotes) {
+ if (!_driver)
+ return;
+
for (int i = 0; i < MIDI_CHANNEL_COUNT; ++i) {
if (!isOutputChannelUsed(i))
continue;
More information about the Scummvm-git-logs
mailing list