From f527958cb35b976d88e7037bda62762c1ffe6e13 Mon Sep 17 00:00:00 2001 From: Ryan Cao <70191398+ryanccn@users.noreply.github.com> Date: Sat, 19 Nov 2022 23:42:56 +0800 Subject: [PATCH] fix: check if packFormat is valid for resourcepack parsing Signed-off-by: Ryan Cao <70191398+ryanccn@users.noreply.github.com> --- launcher/minecraft/mod/ResourcePack.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/launcher/minecraft/mod/ResourcePack.cpp b/launcher/minecraft/mod/ResourcePack.cpp index 9f46cd2c..1e9db596 100644 --- a/launcher/minecraft/mod/ResourcePack.cpp +++ b/launcher/minecraft/mod/ResourcePack.cpp @@ -117,5 +117,5 @@ bool ResourcePack::applyFilter(QRegularExpression filter) const bool ResourcePack::valid() const { - return m_pack_format != 0; + return s_pack_format_versions.contains(m_pack_format); }