Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
pub
open-source-case-studies
Commits
f36c91d0
Commit
f36c91d0
authored
Jun 04, 2021
by
Andre Maroneze
💬
Browse files
[miniz] fix initialization issues in original code
parent
753494b8
Changes
2
Hide whitespace changes
Inline
Side-by-side
miniz/miniz_tdef.c
View file @
f36c91d0
...
...
@@ -1333,6 +1333,7 @@ tdefl_status tdefl_init(tdefl_compressor *d, tdefl_put_buf_func_ptr pPut_buf_fun
d
->
m_output_flush_ofs
=
d
->
m_output_flush_remaining
=
d
->
m_finished
=
d
->
m_block_index
=
d
->
m_bit_buffer
=
d
->
m_wants_to_finish
=
0
;
d
->
m_pLZ_code_buf
=
d
->
m_lz_code_buf
+
1
;
d
->
m_pLZ_flags
=
d
->
m_lz_code_buf
;
*
d
->
m_pLZ_flags
=
0
;
d
->
m_num_flags_left
=
8
;
d
->
m_pOutput_buf
=
d
->
m_output_buf
;
d
->
m_pOutput_buf_end
=
d
->
m_output_buf
;
...
...
miniz/miniz_tinfl.h
View file @
f36c91d0
...
...
@@ -87,11 +87,17 @@ typedef enum {
}
tinfl_status
;
/* Initializes the decompressor to its initial state. */
#define tinfl_init(r) \
do \
{ \
(r)->m_state = 0; \
} \
#define tinfl_init(r) \
do \
{ \
(r)->m_state = 0; \
(r)->m_num_bits = 0; \
(r)->m_bit_buf = 0; \
(r)->m_dist = 0; \
(r)->m_counter = 0; \
(r)->m_num_extra = 0; \
(r)->m_dist_from_out_buf_start = 0; \
} \
MZ_MACRO_END
#define tinfl_get_adler32(r) (r)->m_check_adler32
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment