File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,8 @@ Java_com_github_penfeizhou_animation_gif_decode_GifFrame_uncompressLZW(
56
56
std::vector<Slice> table_string;
57
57
58
58
Slice prefix;
59
+ prefix.len_data = 0 ;
60
+ prefix.ptr_data = nullptr ;
59
61
int table_max_size = (1 << 12 ) - code_end - 1 ;
60
62
while (idx_pixel < pixelsSize) {
61
63
if (offset_data == 0 ) {
@@ -110,8 +112,9 @@ Java_com_github_penfeizhou_animation_gif_decode_GifFrame_uncompressLZW(
110
112
// update ptr so that new table item contain sufix
111
113
slice.ptr_data = pixelsBuffer + idx_pixel - prefix.len_data ;
112
114
slice.len_data = prefix.len_data + 1 ;
113
- memcpy (pixelsBuffer + idx_pixel, current.ptr_data , current.len_data *
114
- sizeof (int ));
115
+ memcpy (pixelsBuffer + idx_pixel, current.ptr_data ,
116
+ current.len_data *
117
+ sizeof (int ));
115
118
idx_pixel += current.len_data ;
116
119
117
120
prefix.ptr_data = current.ptr_data ;
You can’t perform that action at this time.
0 commit comments