diff options
author | Graeme Geldenhuys <graemeg@gmail.com> | 2015-09-02 10:12:13 +0100 |
---|---|---|
committer | Graeme Geldenhuys <graemeg@gmail.com> | 2015-09-02 10:12:13 +0100 |
commit | 772b417cab82318142e0829ba51a71cc21a594a6 (patch) | |
tree | 10bc3c729a4b3737f0a74d7f70c39ac4b41611a3 | |
parent | 9120347be7e401371e20b142390f48b4727c210b (diff) | |
download | fpGUI-772b417cab82318142e0829ba51a71cc21a594a6.tar.xz |
docview: lzw decmopress tweak.
Code change after comparing the Pascal implementation to the
C implementation.
Everything still seems to work as normal after this.
-rw-r--r-- | docview/src/lzwdecompress.pas | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/docview/src/lzwdecompress.pas b/docview/src/lzwdecompress.pas index 5720ba6a..6645890c 100644 --- a/docview/src/lzwdecompress.pas +++ b/docview/src/lzwdecompress.pas @@ -141,9 +141,11 @@ begin inc( pbInput ); end else - input_bit_buffer:= input_bit_buffer - or - ( longword( 0 ) shl ( 24 - input_bit_count ) ); + input_bit_buffer := input_bit_buffer or longword($00); +{ The C version of LZWDecompress uses only "or $00", so I'm assuming the code + below is not needed. Tested and I see no difference. } +// or +// ( longword( 0 ) shl ( 24 - input_bit_count ) ); inc( bytes_out ); inc( input_bit_count, 8 ); end; |