File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ int bit_buffer = 0, bit_mask = 128;
3030unsigned char buffer[N * 2 ];
3131
3232static size_t bytes_written_fputc = 0 ;
33+ static size_t bytes_read_fgetc = 0 ;
3334
3435/* *************************************************************************************
3536 PRIVATE FUNCTIONS
@@ -45,8 +46,6 @@ void lzss_fputc(int const c)
4546
4647int lzss_fgetc ()
4748{
48- static size_t bytes_read_fgetc = 0 ;
49-
5049 /* lzss_file_size is set within SSUBoot:main
5150 * and contains the size of the LZSS file. Once
5251 * all those bytes have been read its time to return
@@ -163,6 +162,8 @@ int lzss_download(ArduinoEsp32OtaReadByteFuncPointer read_byte, ArduinoEsp32OtaW
163162 read_byte_fptr = read_byte;
164163 write_byte_fptr = write_byte;
165164 LZSS_FILE_SIZE = lzss_file_size;
165+ bytes_written_fputc = 0 ;
166+ bytes_read_fgetc = 0 ;
166167 lzss_decode ();
167168 return bytes_written_fputc;
168169}
You can’t perform that action at this time.
0 commit comments