[Scummvm-git-logs] scummvm master -> 6ee213d472378825b7bb46734fa618b20e27ce01
sev-
noreply at scummvm.org
Fri Mar 3 22:24:38 UTC 2023
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
514f11654c COMMON: Split assert() for more finetuned crash reporting
b5042c8513 COMMON: Do not crash on attempt to punyencode empty strings
6ee213d472 IMAGE: CODECS: Add override keyword
Commit: 514f11654c1e1ca3572c0be4c87915ef55189be7
https://github.com/scummvm/scummvm/commit/514f11654c1e1ca3572c0be4c87915ef55189be7
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-03-03T23:19:20+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: b5042c8513329a63eea73cd74d3357b55fc4d628
https://github.com/scummvm/scummvm/commit/b5042c8513329a63eea73cd74d3357b55fc4d628
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-03-03T23:22:34+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: 6ee213d472378825b7bb46734fa618b20e27ce01
https://github.com/scummvm/scummvm/commit/6ee213d472378825b7bb46734fa618b20e27ce01
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-03-03T23:23:49+01:00
Commit Message:
IMAGE: CODECS: Add override keyword
Changed paths:
image/codecs/rpza.h
diff --git a/image/codecs/rpza.h b/image/codecs/rpza.h
index c7a0b292b11..9adb3748a67 100644
--- a/image/codecs/rpza.h
+++ b/image/codecs/rpza.h
@@ -37,7 +37,7 @@ public:
RPZADecoder(uint16 width, uint16 height);
~RPZADecoder() override;
- const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream);
+ const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream) override;
Graphics::PixelFormat getPixelFormat() const override { return _format; }
bool containsPalette() const override { return _ditherPalette != 0; }
More information about the Scummvm-git-logs
mailing list