From 2110f6fa8c397f74e38408612d5514a42f3b9cee Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 26 Jan 2011 14:15:23 +0000 Subject: [PATCH] generator: Fix generation of library-side stubs with optional String arguments. --- generator/generator_c.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generator/generator_c.ml b/generator/generator_c.ml index 0b3c850..46ba691 100644 --- a/generator/generator_c.ml +++ b/generator/generator_c.ml @@ -1047,7 +1047,7 @@ check_state (guestfs_h *g, const char *caller) pr " else\n"; pr " args.%s = 0;\n" n | String n -> - pr " args.%s = (char *) %s;\n" n n; + pr " args.%s = (char *) optargs->%s;\n" n n; pr " else\n"; pr " args.%s = (char *) \"\";\n" n | _ -> assert false -- 1.8.3.1