[Scummvm-git-logs] scummvm master -> eda8c2698f94cd1b8b7d6a2999a8b6119bf5c414
bluegr
noreply at scummvm.org
Wed Jun 21 05:26:31 UTC 2023
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:
eda8c2698f COMMON: Fix incorrect StuffIt directory paths
Commit: eda8c2698f94cd1b8b7d6a2999a8b6119bf5c414
https://github.com/scummvm/scummvm/commit/eda8c2698f94cd1b8b7d6a2999a8b6119bf5c414
Author: elasota (ejlasota at gmail.com)
Date: 2023-06-21T08:26:28+03:00
Commit Message:
COMMON: Fix incorrect StuffIt directory paths
Changed paths:
common/compression/stuffit.cpp
diff --git a/common/compression/stuffit.cpp b/common/compression/stuffit.cpp
index 1e7797e2159..aecbda59d9e 100644
--- a/common/compression/stuffit.cpp
+++ b/common/compression/stuffit.cpp
@@ -202,7 +202,9 @@ bool StuffItArchive::open(Common::SeekableReadStream *stream, bool flattenTree)
if (dirCheckMethod == 33) {
// End of folder
if (!flattenTree && dirPrefix.size() > 0) {
- size_t secondLastDelimiter = dirPrefix.rfind(':', dirPrefix.size() - 1);
+ size_t secondLastDelimiter = Common::String::npos;
+ if (dirPrefix.size() > 1)
+ secondLastDelimiter = dirPrefix.rfind(':', dirPrefix.size() - 2);
if (secondLastDelimiter == Common::String::npos) {
// Only one level deep
More information about the Scummvm-git-logs
mailing list