diff options
author | Johannes Schickel | 2006-07-22 17:06:14 +0000 |
---|---|---|
committer | Johannes Schickel | 2006-07-22 17:06:14 +0000 |
commit | 1ffd49604357ed6fd63e133369a89e3b57711ae2 (patch) | |
tree | a23e0ad94d2656db37601c4f3c90af3b8adb64e6 /common | |
parent | 63aec29edb3e6065e5b167058247fa4cc39adef7 (diff) | |
download | scummvm-rg350-1ffd49604357ed6fd63e133369a89e3b57711ae2.tar.gz scummvm-rg350-1ffd49604357ed6fd63e133369a89e3b57711ae2.tar.bz2 scummvm-rg350-1ffd49604357ed6fd63e133369a89e3b57711ae2.zip |
Added some warnings if md5_file is used on an illegal FilesystemNode.
svn-id: r23568
Diffstat (limited to 'common')
-rw-r--r-- | common/md5.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/common/md5.cpp b/common/md5.cpp index 11bc5d6487..287e14107a 100644 --- a/common/md5.cpp +++ b/common/md5.cpp @@ -234,8 +234,13 @@ void md5_finish(md5_context *ctx, uint8 digest[16]) { } bool md5_file(const FilesystemNode &file, uint8 digest[16], uint32 length) { - if (file.isDirectory()) + if (!file.isValid()) { + warning("md5_file: using an invalid FilesystemNode"); return false; + } else if (file.isDirectory()) { + warning("md5_file: using a diretory FilesystemNode"); + return false; + } return md5_file(file.path().c_str(), digest, length); } |