Browse code

bytecode_vm: fix apicall8

memstr() curiously always had haystack == needle for bytecode.
To fix this it helps if I actually read arg3 from ops[2] instead of ops[0]!

Török Edvin authored on 2010/10/18 17:02:52
Showing 1 changed files
... ...
@@ -896,7 +896,7 @@ int cli_vm_execute(const struct cli_bc *bc, struct cli_bc_ctx *ctx, const struct
896 896
 			/* check that arg2 is size of arg1 */
897 897
 			READP(arg1, inst->u.ops.ops[0], arg2);
898 898
 			READ32(arg4, inst->u.ops.ops[3]);
899
-			READP(arg3, inst->u.ops.ops[0], arg4);
899
+			READP(arg3, inst->u.ops.ops[2], arg4);
900 900
 			resp = cli_apicalls8[api->idx](ctx, arg1, arg2, arg3, arg4);
901 901
 			WRITE32(inst->dest, resp);
902 902
 			break;