From 9723142c2ad0f5b68156461a8df8015422dd6c88 Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Tue, 10 Jul 2018 11:41:49 +0800 Subject: [PATCH] winedump: Add print_string() helper. Signed-off-by: Dmitry Timoshkov Signed-off-by: Jacek Caban Signed-off-by: Alexandre Julliard --- tools/winedump/tlb.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tools/winedump/tlb.c b/tools/winedump/tlb.c index 330fee8fbff..d2883598d7b 100644 --- a/tools/winedump/tlb.c +++ b/tools/winedump/tlb.c @@ -517,11 +517,17 @@ static BOOL dump_msft_namehashtab(seg_t *seg) return TRUE; } -static void dump_string(int len, int align_off) +static void print_string(int len) { printf("\""); fwrite(tlb_read(len), len, 1, stdout); - printf("\" "); + printf("\""); +} + +static void dump_string(int len, int align_off) +{ + print_string(len); + printf(" "); while((len++ + align_off) & 3) printf("\\%2.2x", tlb_read_byte()); }