summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-05-29 18:44:28 +0200
committerGitHub <noreply@github.com>2019-05-29 18:44:28 +0200
commit50f4f9d07b1a027d33ec8b92e3fc2f508d0cb8a1 (patch)
tree6c46feb69cba475adc4bc005ccbde2b555120af3
parentfda0fd0878ffb15799aa5ed53896c15737175eb5 (diff)
parent02bac239d91e06da1f94d8cd6332b56ba2716f29 (diff)
Merge pull request #29287 from akien-mga/invalid-encryption-key
FileAccessEncrypted: Be more explicit on decryption failure
-rw-r--r--core/io/file_access_encrypted.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/io/file_access_encrypted.cpp b/core/io/file_access_encrypted.cpp
index 3cf6908961..3ff9fa569c 100644
--- a/core/io/file_access_encrypted.cpp
+++ b/core/io/file_access_encrypted.cpp
@@ -100,6 +100,7 @@ Error FileAccessEncrypted::open_and_parse(FileAccess *p_base, const Vector<uint8
MD5Update(&md5, (uint8_t *)data.ptr(), data.size());
MD5Final(&md5);
+ ERR_EXPLAIN("The MD5 sum of the decrypted file does not match the expected value. It could be that the file is corrupt, or that the provided decryption key is invalid.");
ERR_FAIL_COND_V(String::md5(md5.digest) != String::md5(md5d), ERR_FILE_CORRUPT);
file = p_base;