From 85d99364cbae7307b43f1de02bc000d36f5e559e Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Sun, 9 Feb 2025 02:30:35 +0100 Subject: [PATCH] ReVPK: check if retrieving directory file stem was successful Error out if it wasn't. --- src/revpk/revpk.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/revpk/revpk.cpp b/src/revpk/revpk.cpp index 5c30c72e..03fa4499 100644 --- a/src/revpk/revpk.cpp +++ b/src/revpk/revpk.cpp @@ -233,7 +233,12 @@ static void ReVPK_Unpack(const CCommand& args) } CUtlString baseName; - PackedStore_GetDirBaseName(vpk.m_DirFilePath, baseName); + + if (!PackedStore_GetDirBaseName(vpk.m_DirFilePath, baseName)) + { + Error(eDLL_T::FS, NO_ERROR, "Failed to retrieve directory file stem from \"%s\"!\n", vpk.m_DirFilePath.String()); + return; + } // Write the unpack log to a file. CFmtStr1024 textFileName("%s%s%s.log", outPath, UNPACK_LOG_DIR, baseName.String());