Skip to content

Commit

Permalink
nocrypt fix
Browse files Browse the repository at this point in the history
  • Loading branch information
psemiletov committed Apr 5, 2021
1 parent 9e6615e commit 164d50f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 0 additions & 2 deletions NEWS-RU
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,4 @@ http://semiletov.org/tea/

Для сборки ТИА с Qt6 надо добавить в зависимости модуль "Qt6-5compat". ТИА 60 столь же стабилен с Qt6, как и с Qt5.



С кирпичным пролетарским приветом, Петр Семилетов!
8 changes: 4 additions & 4 deletions zip.c
Original file line number Diff line number Diff line change
Expand Up @@ -1094,10 +1094,10 @@ extern int ZEXPORT zipOpenNewFileInZip4_64 (zipFile file, const char* filename,
int err = ZIP_OK;
uLong version_to_extract;

# ifdef NOCRYPT
//# ifdef NOCRYPT
if (password != NULL)
return ZIP_PARAMERROR;
# endif
//# endif

if (file == NULL)
return ZIP_PARAMERROR;
Expand Down Expand Up @@ -1286,7 +1286,7 @@ extern int ZEXPORT zipOpenNewFileInZip4_64 (zipFile file, const char* filename,
}

# ifndef NOCRYPT
zi->ci.crypt_header_size = 0;
/* zi->ci.crypt_header_size = 0;
if ((err==Z_OK) && (password != NULL))
{
unsigned char bufHead[RAND_HEAD_LEN];
Expand All @@ -1302,7 +1302,7 @@ extern int ZEXPORT zipOpenNewFileInZip4_64 (zipFile file, const char* filename,

if (ZWRITE64(zi->z_filefunc,zi->filestream,bufHead,sizeHead) != sizeHead)
err = ZIP_ERRNO;
}
}*/
# endif

if (err==Z_OK)
Expand Down

0 comments on commit 164d50f

Please sign in to comment.