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;
30
30
unsigned char buffer[N * 2 ];
31
31
32
32
static size_t bytes_written_fputc = 0 ;
33
+ static size_t bytes_read_fgetc = 0 ;
33
34
34
35
/* *************************************************************************************
35
36
PRIVATE FUNCTIONS
@@ -45,8 +46,6 @@ void lzss_fputc(int const c)
45
46
46
47
int lzss_fgetc ()
47
48
{
48
- static size_t bytes_read_fgetc = 0 ;
49
-
50
49
/* lzss_file_size is set within SSUBoot:main
51
50
* and contains the size of the LZSS file. Once
52
51
* all those bytes have been read its time to return
@@ -163,6 +162,8 @@ int lzss_download(ArduinoEsp32OtaReadByteFuncPointer read_byte, ArduinoEsp32OtaW
163
162
read_byte_fptr = read_byte;
164
163
write_byte_fptr = write_byte;
165
164
LZSS_FILE_SIZE = lzss_file_size;
165
+ bytes_written_fputc = 0 ;
166
+ bytes_read_fgetc = 0 ;
166
167
lzss_decode ();
167
168
return bytes_written_fputc;
168
169
}
You can’t perform that action at this time.
0 commit comments