File tree Expand file tree Collapse file tree 3 files changed +4
-16
lines changed Expand file tree Collapse file tree 3 files changed +4
-16
lines changed Original file line number Diff line number Diff line change @@ -18,10 +18,6 @@ class HOG : public PackFileReadOnly {
1818		return  HOG::GUID;
1919	}
2020
21- 	[[nodiscard]] constexpr  bool  isCaseSensitive () const  override  {
22- 		return  true ;
23- 	}
24- 
2521	[[nodiscard]] std::optional<std::vector<std::byte>> readEntry (const  std::string& path_) const  override ;
2622
2723	[[nodiscard]] Attribute getSupportedEntryAttributes () const  override ;
Original file line number Diff line number Diff line change @@ -20,10 +20,6 @@ class VPP : public PackFileReadOnly {
2020		return  VPP::GUID;
2121	}
2222
23- 	[[nodiscard]] constexpr  bool  isCaseSensitive () const  override  {
24- 		return  true ;
25- 	}
26- 
2723	[[nodiscard]] std::optional<std::vector<std::byte>> readEntry (const  std::string& path_) const  override ;
2824
2925	[[nodiscard]] Attribute getSupportedEntryAttributes () const  override ;
Original file line number Diff line number Diff line change @@ -38,13 +38,11 @@ std::unique_ptr<PackFile> VPP::open(const std::string& path, const EntryCallback
3838		}
3939
4040		//  Get file table offset
41- 		//  16 is the byte size of the header
42- 		uint32_t  headerSize = 16 ;
41+ 		static  constexpr  uint32_t  headerSize = sizeof (uint32_t ) * 4 ;
4342		reader.seek_in (headerSize + sourcepp::math::paddingForAlignment (VPP_ALIGNMENT, headerSize));
4443
4544		//  Get first file offset
46- 		//  64 is the byte size of each file directory entry
47- 		uint32_t  fileTableSize = 64  * entryCount;
45+ 		const  uint32_t  fileTableSize = (60  + sizeof (uint32_t )) * entryCount;
4846		uint32_t  entryOffset = reader.tell_in () + fileTableSize + sourcepp::math::paddingForAlignment (VPP_ALIGNMENT, fileTableSize);
4947
5048		//  Read file entries
@@ -78,13 +76,11 @@ std::unique_ptr<PackFile> VPP::open(const std::string& path, const EntryCallback
7876		}
7977
8078		//  Get file table offset
81- 		//  16 is the byte size of the header
82- 		uint32_t  headerSize = 16 ;
79+ 		static  constexpr  uint32_t  headerSize = sizeof (uint32_t ) * 4 ;
8380		reader.seek_in (headerSize + sourcepp::math::paddingForAlignment (VPP_ALIGNMENT, headerSize));
8481
8582		//  Get first file offset
86- 		//  32 is the byte size of each file directory entry
87- 		uint32_t  fileTableSize = 32  * entryCount;
83+ 		const  uint32_t  fileTableSize = (24  + sizeof (uint32_t ) * 2 ) * entryCount;
8884		uint32_t  entryOffset = reader.tell_in () + fileTableSize + sourcepp::math::paddingForAlignment (VPP_ALIGNMENT, fileTableSize);
8985
9086		//  Read file entries
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments