diff options
author | Hubert Maier | 2019-10-11 21:50:52 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2019-10-13 13:08:05 +0200 |
commit | 75ebbc865f9d84a31a97b4dbd2e9434bc15b6335 (patch) | |
tree | 4d6e2eb523167ef0639f2bb18c4f79e6c0d1a01b /backends/fs/amigaos4 | |
parent | 578ad110112a20c7944ee6946f83719708a2f799 (diff) | |
download | scummvm-rg350-75ebbc865f9d84a31a97b4dbd2e9434bc15b6335.tar.gz scummvm-rg350-75ebbc865f9d84a31a97b4dbd2e9434bc15b6335.tar.bz2 scummvm-rg350-75ebbc865f9d84a31a97b4dbd2e9434bc15b6335.zip |
AMIGAOS4: Fix positioning of workaround
Otherwise both dos.library and it's interface will remain open in the rare (?) occasion of p.size <= 0,
Diffstat (limited to 'backends/fs/amigaos4')
-rw-r--r-- | backends/fs/amigaos4/amigaos4-fs.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/backends/fs/amigaos4/amigaos4-fs.cpp b/backends/fs/amigaos4/amigaos4-fs.cpp index c6261cf39d..7657bf20c0 100644 --- a/backends/fs/amigaos4/amigaos4-fs.cpp +++ b/backends/fs/amigaos4/amigaos4-fs.cpp @@ -69,6 +69,15 @@ AmigaOSFilesystemNode::AmigaOSFilesystemNode() { AmigaOSFilesystemNode::AmigaOSFilesystemNode(const Common::String &p) { ENTER(); + int offset = p.size(); + + //assert(offset > 0); + + if (offset <= 0) { + debug(6, "Bad offset"); + return; + } + // WORKAROUND: // This is a bug in AmigaOS4 newlib.library 53.30 and lower. // It will be removed once a fixed version is available to public. @@ -80,15 +89,6 @@ AmigaOSFilesystemNode::AmigaOSFilesystemNode(const Common::String &p) { // than one engine/(shared) plugin is available. DOSBase = IExec->OpenLibrary("dos.library", 0); IDOS = (struct DOSIFace *)IExec->GetInterface(DOSBase, "main", 1, NULL); - - int offset = p.size(); - - //assert(offset > 0); - - if (offset <= 0) { - debug(6, "Bad offset"); - return; - } _sPath = p; _sDisplayName = ::lastPathComponent(_sPath); |