From 4293b71a900ac3abfb178405e228c3f45915f5c0 Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Sat, 31 Oct 2009 13:40:12 +0000 Subject: [PATCH] guestfish: Fix printing of buffers in structs. Somehow an 'indent' string crept in there, so it was printing: ... instead of: ... --- src/generator.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/generator.ml b/src/generator.ml index 2cabd4a..b17ee65 100755 --- a/src/generator.ml +++ b/src/generator.ml @@ -6289,9 +6289,9 @@ and generate_fish_cmds () = pr " printf (\"%%s%s: \", indent);\n" name; pr " for (i = 0; i < %s->%s_len; ++i)\n" typ name; pr " if (c_isprint (%s->%s[i]))\n" typ name; - pr " printf (\"%%s%%c\", indent, %s->%s[i]);\n" typ name; + pr " printf (\"%%c\", %s->%s[i]);\n" typ name; pr " else\n"; - pr " printf (\"%%s\\\\x%%02x\", indent, %s->%s[i]);\n" typ name; + pr " printf (\"\\\\x%%02x\", %s->%s[i]);\n" typ name; pr " printf (\"\\n\");\n" | name, (FUInt64|FBytes) -> pr " printf (\"%%s%s: %%\" PRIu64 \"\\n\", indent, %s->%s);\n" -- 1.8.3.1