summaryrefslogtreecommitdiff
path: root/modules/etc/texture_loader_pkm.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-08-17 14:44:47 +0200
committerGitHub <noreply@github.com>2019-08-17 14:44:47 +0200
commitf7e57df6a290388c18c34047490dd524a20316b0 (patch)
treedc06516ab438b65a025d5e5c0bab9cc97735e2ee /modules/etc/texture_loader_pkm.cpp
parentde4aabe89b7b68677f145f21c956183bbc92f686 (diff)
parentd3153c28f0b82ca047a892f6dbcd9d5f9344e3d5 (diff)
Merge pull request #31431 from akien-mga/err_explain
Replace last occurrences of 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG'
Diffstat (limited to 'modules/etc/texture_loader_pkm.cpp')
-rw-r--r--modules/etc/texture_loader_pkm.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/modules/etc/texture_loader_pkm.cpp b/modules/etc/texture_loader_pkm.cpp
index 3337460dfc..dd61d816d4 100644
--- a/modules/etc/texture_loader_pkm.cpp
+++ b/modules/etc/texture_loader_pkm.cpp
@@ -62,10 +62,8 @@ RES ResourceFormatPKM::load(const String &p_path, const String &p_original_path,
f->set_endian_swap(true);
ETC1Header h;
- ERR_EXPLAIN("Invalid or Unsupported PKM texture file: " + p_path);
f->get_buffer((uint8_t *)&h.tag, sizeof(h.tag));
- if (strncmp(h.tag, "PKM 10", sizeof(h.tag)))
- ERR_FAIL_V(RES());
+ ERR_FAIL_COND_V_MSG(strncmp(h.tag, "PKM 10", sizeof(h.tag)), RES(), "Invalid or unsupported PKM texture file: " + p_path + ".");
h.format = f->get_16();
h.texWidth = f->get_16();