diff options
| author | jakob <jakob@memeware.net> | 2017-01-13 20:54:39 -0500 |
|---|---|---|
| committer | jakob <jakob@memeware.net> | 2017-01-13 20:54:39 -0500 |
| commit | d6a443127b6f8173aeab214942e0b6f31f7c4224 (patch) | |
| tree | 0a148b4b77019e559342aee9bd12923c98d6d90b /src/write.c | |
| parent | b51100b3330605a6c9bdb3e07e7f9981ff73f6ec (diff) | |
Fixed memory leaking issues and introduced a feature to list the contents of an archive.
Diffstat (limited to 'src/write.c')
| -rw-r--r-- | src/write.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/write.c b/src/write.c index e011504..ebf640c 100644 --- a/src/write.c +++ b/src/write.c @@ -55,7 +55,7 @@ char *pop_file_name(uint32_t key, elif_node *root) { entry to disk, according to information specified by the node. */ void write_files(file_node *file_root, elif_node *elif_root, FILE *archive) { file_node *current; - key encryption_key = get_encryption_key(arguments.source); + key encryption_key = get_encryption_key(arguments.game); Bytef *compressed_buffer, *decompressed_buffer, *out_buffer, *out_start; for (current = file_root->next; current != NULL; current = current->next) { char *file_name = pop_file_name(current->key, elif_root); @@ -84,7 +84,7 @@ void write_files(file_node *file_root, elif_node *elif_root, FILE *archive) { free(decompressed_buffer); } - if (arguments.source != NO_CRYPTO) { + if (arguments.game != NO_CRYPTO) { decrypt_buffer(out_start, current->file_size, encryption_key, current->key); } |