mirror of
				https://github.com/eledio-devices/thirdparty-miniz.git
				synced 2025-10-31 00:32:38 +01:00 
			
		
		
		
	Fix issues missed from merge. Now builds properly.
This commit is contained in:
		| @@ -1,3 +1,4 @@ | |||||||
|  | #include "miniz_tinfl.h" | ||||||
|  |  | ||||||
| // ------------------- Low-level Decompression (completely independent from all compression API's) | // ------------------- Low-level Decompression (completely independent from all compression API's) | ||||||
|  |  | ||||||
|   | |||||||
| @@ -3220,7 +3220,7 @@ static mz_bool mz_zip_writer_update_zip64_extension_block(mz_zip_array *pNew_ext | |||||||
|             pDst += sizeof(mz_uint32); |             pDst += sizeof(mz_uint32); | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         mz_write_le16(new_ext_block + sizeof(mz_uint16), safe_int_cast<mz_uint16>((pDst - new_ext_block) - sizeof(mz_uint16) * 2)); |         mz_write_le16(new_ext_block + sizeof(mz_uint16), (mz_uint16)((pDst - new_ext_block) - sizeof(mz_uint16) * 2)); | ||||||
|  |  | ||||||
|         if (!mz_zip_array_push_back(pZip, pNew_ext, new_ext_block, pDst - new_ext_block)) |         if (!mz_zip_array_push_back(pZip, pNew_ext, new_ext_block, pDst - new_ext_block)) | ||||||
|             return mz_zip_set_error(pZip, MZ_ZIP_ALLOC_FAILED); |             return mz_zip_set_error(pZip, MZ_ZIP_ALLOC_FAILED); | ||||||
|   | |||||||
							
								
								
									
										52
									
								
								miniz_zip.h
									
									
									
									
									
								
							
							
						
						
									
										52
									
								
								miniz_zip.h
									
									
									
									
									
								
							| @@ -86,32 +86,6 @@ typedef enum | |||||||
|     MZ_ZIP_MODE_WRITING_HAS_BEEN_FINALIZED = 3 |     MZ_ZIP_MODE_WRITING_HAS_BEEN_FINALIZED = 3 | ||||||
| } mz_zip_mode; | } mz_zip_mode; | ||||||
|  |  | ||||||
| typedef struct |  | ||||||
| { |  | ||||||
|     mz_uint64 m_archive_size; |  | ||||||
|     mz_uint64 m_central_directory_file_ofs; |  | ||||||
|  |  | ||||||
|     // We only support up to UINT32_MAX files in zip64 mode. |  | ||||||
|     mz_uint32 m_total_files; |  | ||||||
|     mz_zip_mode m_zip_mode; |  | ||||||
|     mz_zip_type m_zip_type; |  | ||||||
|     mz_zip_error m_last_error; |  | ||||||
|  |  | ||||||
|     mz_uint64 m_file_offset_alignment; |  | ||||||
|  |  | ||||||
|     mz_alloc_func m_pAlloc; |  | ||||||
|     mz_free_func m_pFree; |  | ||||||
|     mz_realloc_func m_pRealloc; |  | ||||||
|     void *m_pAlloc_opaque; |  | ||||||
|  |  | ||||||
|     mz_file_read_func m_pRead; |  | ||||||
|     mz_file_write_func m_pWrite; |  | ||||||
|     void *m_pIO_opaque; |  | ||||||
|  |  | ||||||
|     mz_zip_internal_state *m_pState; |  | ||||||
|  |  | ||||||
| } mz_zip_archive; |  | ||||||
|  |  | ||||||
| typedef enum | typedef enum | ||||||
| { | { | ||||||
|     MZ_ZIP_FLAG_CASE_SENSITIVE = 0x0100, |     MZ_ZIP_FLAG_CASE_SENSITIVE = 0x0100, | ||||||
| @@ -173,6 +147,32 @@ typedef enum | |||||||
|     MZ_ZIP_TOTAL_ERRORS |     MZ_ZIP_TOTAL_ERRORS | ||||||
| } mz_zip_error; | } mz_zip_error; | ||||||
|  |  | ||||||
|  | typedef struct | ||||||
|  | { | ||||||
|  |     mz_uint64 m_archive_size; | ||||||
|  |     mz_uint64 m_central_directory_file_ofs; | ||||||
|  |  | ||||||
|  |     // We only support up to UINT32_MAX files in zip64 mode. | ||||||
|  |     mz_uint32 m_total_files; | ||||||
|  |     mz_zip_mode m_zip_mode; | ||||||
|  |     mz_zip_type m_zip_type; | ||||||
|  |     mz_zip_error m_last_error; | ||||||
|  |  | ||||||
|  |     mz_uint64 m_file_offset_alignment; | ||||||
|  |  | ||||||
|  |     mz_alloc_func m_pAlloc; | ||||||
|  |     mz_free_func m_pFree; | ||||||
|  |     mz_realloc_func m_pRealloc; | ||||||
|  |     void *m_pAlloc_opaque; | ||||||
|  |  | ||||||
|  |     mz_file_read_func m_pRead; | ||||||
|  |     mz_file_write_func m_pWrite; | ||||||
|  |     void *m_pIO_opaque; | ||||||
|  |  | ||||||
|  |     mz_zip_internal_state *m_pState; | ||||||
|  |  | ||||||
|  | } mz_zip_archive; | ||||||
|  |  | ||||||
| // -------- ZIP reading | // -------- ZIP reading | ||||||
|  |  | ||||||
| // Inits a ZIP archive reader. | // Inits a ZIP archive reader. | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user