Browse code

bytecode: fix multiple bytecode execution in same hook.

Do not reset filesize to 0.
Otherwise only the 1st bytecode executed in a hook can really scan the file,
all further bytecodes executed in same hook will fail to read anything from the
file.

Török Edvin authored on 2010/10/18 16:56:31
Showing 1 changed files
... ...
@@ -165,7 +165,7 @@ static int cli_bytecode_context_reset(struct cli_bc_ctx *ctx)
165 165
     }
166 166
     ctx->numParams = 0;
167 167
     ctx->funcid = 0;
168
-    ctx->file_size = 0;
168
+    /* don't touch fmap, file_size, and hooks, sections, ctx, timeout, pdf* */
169 169
     ctx->off = 0;
170 170
     ctx->written = 0;
171 171
     ctx->jsnormwritten = 0;