From aac8c84442127ab05581ed763ed808d5e55a0665 Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Fri, 15 Nov 2024 13:59:12 +0100 Subject: [PATCH] VpkLib: use correct type for chunk offset This var must be unsigned as VPKChunkDescriptor_t's ctor takes an u64 for chunk offset. --- src/vpklib/packedstore.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vpklib/packedstore.cpp b/src/vpklib/packedstore.cpp index 331a9eab..0dea31ca 100644 --- a/src/vpklib/packedstore.cpp +++ b/src/vpklib/packedstore.cpp @@ -746,7 +746,7 @@ VPKEntryBlock_t::VPKEntryBlock_t(const uint8_t* pData, size_t nLen, int64_t nOff size_t nFragmentCount = (nLen + VPK_ENTRY_MAX_LEN - 1) / VPK_ENTRY_MAX_LEN; size_t nFileSize = nLen; - int64_t nCurrentOffset = nOffset; + uint64_t nCurrentOffset = nOffset; for (size_t i = 0; i < nFragmentCount; i++) // Fragment data into 1 MiB chunks. {