summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2021-01-21 21:33:04 +0100
committerDaniel Friesel <derf@finalrewind.org>2021-01-21 21:33:04 +0100
commit68f30da720bb46054d2abd9814622dd79a607e4d (patch)
treef916780149413ab6681d24a68a7eed4117c777bf /src
parent2b6ce95e4c51b22ebfbb13ff90e7fdfc54446a64 (diff)
fix illegal array access
Diffstat (limited to 'src')
-rw-r--r--src/lib/deflate.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/deflate.cc b/src/lib/deflate.cc
index 1349d48..e475419 100644
--- a/src/lib/deflate.cc
+++ b/src/lib/deflate.cc
@@ -250,7 +250,7 @@ static int8_t deflate_huffman(uint8_t * ll_lengths, uint16_t ll_size,
return DEFLATE_ERR_OUTPUT_LENGTH;
}
deflate_output_now[0] =
- deflate_output_now[-dist_val];
+ *(deflate_output_now - dist_val);
deflate_output_now++;
}
}