summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDerf Null <derf@finalrewind.org>2023-03-12 10:13:07 +0100
committerDerf Null <derf@finalrewind.org>2023-03-12 10:13:07 +0100
commit553fedfeb11f95e1773b5f6cdfc7775834cbfa12 (patch)
tree8e38e8a95e5fcafc0e4850cc8f374b8bd6b78041 /src
parent33d07ed6276687f8fd0181b3c743481609323cce (diff)
inflate.cc: Incorporate change from zlib-deflate-nostdlib
Patch provided by Andrew Jeddeloh
Diffstat (limited to 'src')
-rw-r--r--src/lib/inflate.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/inflate.cc b/src/lib/inflate.cc
index 854ddb2..02fe350 100644
--- a/src/lib/inflate.cc
+++ b/src/lib/inflate.cc
@@ -387,16 +387,15 @@ static int8_t deflate_static_huffman()
static int8_t deflate_dynamic_huffman()
{
- uint8_t i;
uint16_t hlit = 257 + deflate_get_bits(5);
uint8_t hdist = 1 + deflate_get_bits(5);
uint8_t hclen = 4 + deflate_get_bits(4);
- for (i = 0; i < hclen; i++) {
+ for (uint8_t i = 0; i < hclen; i++) {
deflate_hc_lengths[deflate_hclen_index[i]] =
deflate_get_bits(3);
}
- for (i = hclen; i < sizeof(deflate_hc_lengths); i++) {
+ for (uint8_t i = hclen; i < sizeof(deflate_hc_lengths); i++) {
deflate_hc_lengths[deflate_hclen_index[i]] = 0;
}