mirror of
				https://github.com/eledio-devices/thirdparty-miniz.git
				synced 2025-10-31 00:32:38 +01:00 
			
		
		
		
	Fix MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_UTF8 not being set
This commit is contained in:
		| @@ -3478,15 +3478,15 @@ mz_bool mz_zip_writer_add_read_buf_callback(mz_zip_archive *pZip, const char *pA | ||||
|     mz_zip_internal_state *pState; | ||||
|     mz_uint64 file_ofs = 0, cur_archive_header_file_ofs; | ||||
|  | ||||
|     if (!(level_and_flags & MZ_ZIP_FLAG_ASCII_FILENAME)) | ||||
|         gen_flags |= MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_UTF8; | ||||
|  | ||||
|     if ((int)level_and_flags < 0) | ||||
|         level_and_flags = MZ_DEFAULT_LEVEL; | ||||
|     level = level_and_flags & 0xF; | ||||
|  | ||||
|     gen_flags = (level_and_flags & MZ_ZIP_FLAG_WRITE_HEADER_SET_SIZE) ? 0 : MZ_ZIP_LDH_BIT_FLAG_HAS_LOCATOR; | ||||
|  | ||||
|     if (!(level_and_flags & MZ_ZIP_FLAG_ASCII_FILENAME)) | ||||
|         gen_flags |= MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_UTF8; | ||||
|  | ||||
|     /* Sanity checks */ | ||||
|     if ((!pZip) || (!pZip->m_pState) || (pZip->m_zip_mode != MZ_ZIP_MODE_WRITING) || (!pArchive_name) || ((comment_size) && (!pComment)) || (level > MZ_UBER_COMPRESSION)) | ||||
|         return mz_zip_set_error(pZip, MZ_ZIP_INVALID_PARAMETER); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user