]> The Tcpdump Group git mirrors - libpcap/blobdiff - gencode.c
We have to initialize the n_left values for the chunks as well.
[libpcap] / gencode.c
index ea641f1d063f105ae4ca6c02fbb85912ddc1300d..f1b3b75c75381f488abae29096951c93a8a6075d 100644 (file)
--- a/gencode.c
+++ b/gencode.c
@@ -553,8 +553,10 @@ initchunks(compiler_state_t *cstate)
 {
        int i;
 
-       for (i = 0; i < NCHUNKS; i++)
+       for (i = 0; i < NCHUNKS; i++) {
+               cstate->chunks[i].n_left = 0;
                cstate->chunks[i].m = NULL;
+       }
        cstate->cur_chunk = 0;
 }