aboutsummaryrefslogtreecommitdiff
path: root/dec
diff options
context:
space:
mode:
authoreustas <eustas.ru@gmail.com>2016-02-04 15:42:53 +0100
committereustas <eustas.ru@gmail.com>2016-02-04 15:42:53 +0100
commit68f5bbda76f9b36717a4f9aa91a9d5d88ba584d3 (patch)
tree0f66214b9c52802490e65bd4edca65081ca7b529 /dec
parent37a320dd81db8d546cd24a45b4c61d87b45dcade (diff)
downloadbrotli-68f5bbda76f9b36717a4f9aa91a9d5d88ba584d3.zip
brotli-68f5bbda76f9b36717a4f9aa91a9d5d88ba584d3.tar.gz
brotli-68f5bbda76f9b36717a4f9aa91a9d5d88ba584d3.tar.bz2
Update decode.c
Diffstat (limited to 'dec')
-rw-r--r--dec/decode.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/dec/decode.c b/dec/decode.c
index 892a254..a614c55 100644
--- a/dec/decode.c
+++ b/dec/decode.c
@@ -1714,13 +1714,13 @@ postReadDistance:
} else {
const uint8_t *ringbuffer_end_minus_copy_length =
s->ringbuffer_end - i;
+ uint8_t* copy_src = &s->ringbuffer[
+ (pos - s->distance_code) & s->ringbuffer_mask];
+ uint8_t* copy_dst = &s->ringbuffer[pos];
/* Check for possible underflow and clamp the pointer to 0. */
if (PREDICT_FALSE(s->ringbuffer_end < (const uint8_t*)0 + i)) {
ringbuffer_end_minus_copy_length = 0;
}
- uint8_t* copy_src = &s->ringbuffer[
- (pos - s->distance_code) & s->ringbuffer_mask];
- uint8_t* copy_dst = &s->ringbuffer[pos];
/* update the recent distances cache */
s->dist_rb[s->dist_rb_idx & 3] = s->distance_code;
++s->dist_rb_idx;